Class DepthRenderTargetMixin
- All Implemented Interfaces:
ReadableDepthRenderTarget
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidbindWrite(boolean boolean_1) voidFreezes the current depth texture for use inReadableDepthRenderTarget.getStillDepthMap().intReturns a still of this render target's depth texture.
-
Field Details
-
useDepth
public boolean useDepth -
width
public int width -
height
public int height
-
-
Constructor Details
-
DepthRenderTargetMixin
public DepthRenderTargetMixin()
-
-
Method Details
-
bindWrite
public abstract void bindWrite(boolean boolean_1) -
getStillDepthMap
public int getStillDepthMap()Description copied from interface:ReadableDepthRenderTargetReturns a still of this render target's depth texture. For most intents and purposes, this is the texture that API consumers should read from.This texture is updated only when
ReadableDepthRenderTarget.freezeDepthMap()is called. For the main render target, it is updated automatically right beforePostLevelRenderCallback.EVENTis fired. Note that the content of the main render target's depth texture depends on the graphic quality setting. WithGraphicsStatus.FABULOUS, no translucent object will appear on the main depth texture, so consumers may need to also use the depth textures from the various layers used by theLevelRenderer's transparency shader.Because this texture is independent from the render target's actual depth texture, it is safe to use anytime (whereas using the actual depth texture may cause corruption if it is simultaneously written to).
The returned value may be -1 if the render target does not have a depth attachment. This should never be the case for the main render target.
- Specified by:
getStillDepthMapin interfaceReadableDepthRenderTarget- Returns:
- a still of this render target's depth texture
-
freezeDepthMap
public void freezeDepthMap()Description copied from interface:ReadableDepthRenderTargetFreezes the current depth texture for use inReadableDepthRenderTarget.getStillDepthMap().This is called by default on the
Minecraft.getMainRenderTarget()main render target once every frame, right beforePostLevelRenderCallbackis fired.Calling this method will bind
thisrender target.- Specified by:
freezeDepthMapin interfaceReadableDepthRenderTarget
-