Class PostProcessor

java.lang.Object
team.lodestar.lodestone.systems.postprocess.PostProcessor
Direct Known Subclasses:
MultiInstancePostProcessor

public abstract class PostProcessor extends Object
Abstract world space post-process pass. If your shader needs the world space depth buffer, add a target called "depthMain" for it to automatically
See Also:
  • Field Details

    • MC

      protected static final net.minecraft.client.Minecraft MC
    • COMMON_UNIFORMS

      public static final Collection<com.mojang.datafixers.util.Pair<String,Consumer<com.mojang.blaze3d.shaders.Uniform>>> COMMON_UNIFORMS
    • viewModelMatrix

      public static org.joml.Matrix4f viewModelMatrix
      Being updated every frame before calling applyPostProcess() by PostProcessHandler
    • postChain

      protected net.minecraft.client.renderer.PostChain postChain
    • effects

      protected net.minecraft.client.renderer.EffectInstance[] effects
    • time

      protected double time
  • Constructor Details

    • PostProcessor

      public PostProcessor()
  • Method Details

    • getPostChainLocation

      public abstract net.minecraft.resources.ResourceLocation getPostChainLocation()
      Example: "octus:foo" points to octus:shaders/post/foo.json
    • init

      public void init()
    • loadPostChain

      public final void loadPostChain()
      Load or reload the shader
    • copyDepthBuffer

      public final void copyDepthBuffer()
    • resize

      public void resize(int width, int height)
    • applyPostProcess

      public final void applyPostProcess()
    • beforeProcess

      public abstract void beforeProcess(org.joml.Matrix4f viewModelMatrix)
      Set uniforms and bind textures here
    • afterProcess

      public abstract void afterProcess()
      Unbind textures
    • setActive

      public final void setActive(boolean active)
    • isActive

      public final boolean isActive()