Class PostProcessor
java.lang.Object
team.lodestar.lodestone.systems.postprocess.PostProcessor
- Direct Known Subclasses:
MultiInstancePostProcessor
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 Summary
FieldsModifier and TypeFieldDescriptionstatic 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.Minecraftprotected net.minecraft.client.renderer.PostChainprotected doublestatic org.joml.Matrix4fBeing updated every frame before calling applyPostProcess() by PostProcessHandler -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidUnbind texturesfinal voidabstract voidbeforeProcess(org.joml.Matrix4f viewModelMatrix) Set uniforms and bind textures herefinal voidabstract net.minecraft.resources.ResourceLocationExample: "octus:foo" points to octus:shaders/post/foo.jsonvoidinit()final booleanisActive()final voidLoad or reload the shadervoidresize(int width, int height) final voidsetActive(boolean active)
-
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 viewModelMatrixBeing 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()
-