@@ -74,7 +74,7 @@ public class IrisLodRenderProgram
74
74
private final ProgramImages images ;
75
75
private final BlendModeOverride blend ;
76
76
77
- public static IrisLodRenderProgram createProgram (String name , boolean isShadowPass , ProgramSource source , CustomUniforms uniforms , NewWorldRenderingPipeline pipeline ) {
77
+ public static IrisLodRenderProgram createProgram (String name , boolean isShadowPass , boolean translucent , ProgramSource source , CustomUniforms uniforms , NewWorldRenderingPipeline pipeline ) {
78
78
Map <PatchShaderType , String > transformed = TransformPatcher .patchDH (
79
79
name ,
80
80
source .getVertexSource ().orElseThrow (RuntimeException ::new ),
@@ -92,7 +92,7 @@ public static IrisLodRenderProgram createProgram(String name, boolean isShadowPa
92
92
.addSources (transformed )
93
93
.setName ("dh_" + name )
94
94
.print ();
95
- return new IrisLodRenderProgram (name , isShadowPass , source .getDirectives ().getBlendModeOverride ().orElse (null ), vertex , tessControl , tessEval , geometry , fragment , uniforms , pipeline );
95
+ return new IrisLodRenderProgram (name , isShadowPass , translucent , source .getDirectives ().getBlendModeOverride ().orElse (null ), vertex , tessControl , tessEval , geometry , fragment , uniforms , pipeline );
96
96
}
97
97
98
98
public int tryGetUniformLocation2 (CharSequence name ) {
@@ -104,7 +104,7 @@ public int tryGetUniformLocation2(CharSequence name) {
104
104
// Noise Uniforms
105
105
106
106
// This will bind AbstractVertexAttribute
107
- private IrisLodRenderProgram (String name , boolean isShadowPass , BlendModeOverride override , String vertex , String tessControl , String tessEval , String geometry , String fragment , CustomUniforms customUniforms , NewWorldRenderingPipeline pipeline )
107
+ private IrisLodRenderProgram (String name , boolean isShadowPass , boolean translucent , BlendModeOverride override , String vertex , String tessControl , String tessEval , String geometry , String fragment , CustomUniforms customUniforms , NewWorldRenderingPipeline pipeline )
108
108
{
109
109
id = GL43C .glCreateProgram ();
110
110
@@ -160,7 +160,7 @@ private IrisLodRenderProgram(String name, boolean isShadowPass, BlendModeOverrid
160
160
customUniforms .assignTo (uniformBuilder );
161
161
BuiltinReplacementUniforms .addBuiltinReplacementUniforms (uniformBuilder );
162
162
ProgramImages .Builder builder = ProgramImages .builder (id );
163
- pipeline .addGbufferOrShadowSamplers (samplerBuilder , builder , isShadowPass ? () -> pipeline .flippedBeforeShadow : () -> pipeline .flippedAfterPrepare , isShadowPass , new InputAvailability (false , true , false ));
163
+ pipeline .addGbufferOrShadowSamplers (samplerBuilder , builder , isShadowPass ? () -> pipeline .flippedBeforeShadow : () -> translucent ? pipeline . flippedAfterTranslucent : pipeline .flippedAfterPrepare , isShadowPass , new InputAvailability (false , true , false ));
164
164
customUniforms .mapholderToPass (uniformBuilder , this );
165
165
this .uniforms = uniformBuilder .buildUniforms ();
166
166
this .customUniforms = customUniforms ;
0 commit comments