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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Collection<com.mojang.datafixers.util.Pair<String,Consumer<com.mojang.blaze3d.shaders.Uniform>>>
     
    protected net.minecraft.client.renderer.EffectInstance[]
     
    protected static final net.minecraft.client.Minecraft
     
    protected net.minecraft.client.renderer.PostChain
     
    protected double
     
    static com.mojang.blaze3d.vertex.PoseStack
    Being updated every frame before calling applyPostProcess() by PostProcessHandler
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Unbind textures
    final void
     
    abstract void
    beforeProcess(com.mojang.blaze3d.vertex.PoseStack viewModelStack)
    Set uniforms and bind textures here
    final void
     
    abstract net.minecraft.resources.ResourceLocation
    Example: "octus:foo" points to octus:shaders/post/foo.json
    void
     
    final boolean
     
    final void
    Load or reload the shader
    void
    resize(int width, int height)
     
    final void
    setActive(boolean active)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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
    • viewModelStack

      public static com.mojang.blaze3d.vertex.PoseStack viewModelStack
      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(com.mojang.blaze3d.vertex.PoseStack viewModelStack)
      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()