Class MultiInstancePostProcessor<I extends DynamicShaderFxInstance>

java.lang.Object
team.lodestar.lodestone.systems.postprocess.PostProcessor
team.lodestar.lodestone.systems.postprocess.MultiInstancePostProcessor<I>

public abstract class MultiInstancePostProcessor<I extends DynamicShaderFxInstance> extends PostProcessor
  • Constructor Details

    • MultiInstancePostProcessor

      public MultiInstancePostProcessor()
  • Method Details

    • getMaxInstances

      protected abstract int getMaxInstances()
      THIS VALUE SHOULD NOT CHANGE!!!
      Returns:
      max fx instance count
    • getDataSizePerInstance

      protected abstract int getDataSizePerInstance()
      THIS VALUE SHOULD NOT CHANGE!!!
      Returns:
      the size of data (how many floats) it takes for passing one fx instance to the shader
    • init

      public void init()
      Overrides:
      init in class PostProcessor
    • addFxInstance

      @Nullable public I addFxInstance(I instance)
      Add a fx instance
      Returns:
      the instance got added or null if the amount of instances has reached the max
    • beforeProcess

      public void beforeProcess(com.mojang.blaze3d.vertex.PoseStack viewModelStack)
      Description copied from class: PostProcessor
      Set uniforms and bind textures here
      Specified by:
      beforeProcess in class PostProcessor
    • setDataBufferUniform

      protected void setDataBufferUniform(net.minecraft.client.renderer.EffectInstance effectInstance, String bufferName, String countName)