Class DeferredShaderStateCache

java.lang.Object
foundry.veil.impl.client.render.deferred.DeferredShaderStateCache

@Internal public class DeferredShaderStateCache extends Object
  • 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

      public boolean setupRenderState(@Nullable @Nullable ShaderProgram 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
    • 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