Class DeferredShaderStateCache
java.lang.Object
foundry.veil.impl.client.render.deferred.DeferredShaderStateCache
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetShader(@Nullable ShaderProgram shaderProgram) Retrieves the shader that should be used if using deferred renderingnet.minecraft.client.renderer.ShaderInstancegetShader(@Nullable net.minecraft.client.renderer.ShaderInstance shaderInstance) Retrieves the shader that should be used if using deferred renderingbooleansetupRenderState(@Nullable ShaderProgram shaderInstance) Sets up the render state for the specified shader instance.booleansetupRenderState(@Nullable net.minecraft.client.renderer.ShaderInstance shaderInstance) Sets up the render state for the specified shader instance.
-
Constructor Details
-
DeferredShaderStateCache
public DeferredShaderStateCache()
-
-
Method Details
-
setupRenderState
public boolean setupRenderState(@Nullable @Nullable net.minecraft.client.renderer.ShaderInstance shaderInstance) Sets up the render state for the specified shader instance.- Parameters:
shaderInstance- The shader to set the render state for- Returns:
- Whether the state was handled and set
-
setupRenderState
Sets up the render state for the specified shader instance.- Parameters:
shaderInstance- The shader to set the render state for- Returns:
- Whether the state was handled and set
-
getShader
@Contract("null -> null") public net.minecraft.client.renderer.ShaderInstance getShader(@Nullable @Nullable net.minecraft.client.renderer.ShaderInstance shaderInstance) Retrieves the shader that should be used if using deferred rendering- Parameters:
shaderInstance- The shader to get the render state for- Returns:
- The shader to use
-
getShader
@Contract("null -> null") public ShaderProgram getShader(@Nullable @Nullable ShaderProgram shaderProgram) Retrieves the shader that should be used if using deferred rendering- Parameters:
shaderProgram- The shader to get the render state for- Returns:
- The shader to use
-