Keep hats and cloaks on the posed model, and fix resources on 1.21.4 and 1.21.5 #41
@@ -48,6 +48,9 @@ public final class GlassRenderer {
|
|||||||
.withLocation(Identifier.of("saturnclient", "pipeline/glass"))
|
.withLocation(Identifier.of("saturnclient", "pipeline/glass"))
|
||||||
.withFragmentShader(Identifier.of("saturnclient", "core/glass"))
|
.withFragmentShader(Identifier.of("saturnclient", "core/glass"))
|
||||||
.withSampler("Sampler1")
|
.withSampler("Sampler1")
|
||||||
|
// The transforms block ends with LineWidth before 1.21.11 (see glass.fsh).
|
||||||
|
//? if <1.21.11
|
||||||
|
//.withShaderDefine("HAS_LINE_WIDTH")
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
private static final Identifier BLUR = Identifier.ofVanilla("post_effect/blur.json");
|
private static final Identifier BLUR = Identifier.ofVanilla("post_effect/blur.json");
|
||||||
|
|||||||
@@ -3,8 +3,18 @@
|
|||||||
// Saturn's glass: the blurred game behind the screen, cut to a panel's shape. For 1.21.6 and
|
// Saturn's glass: the blurred game behind the screen, cut to a panel's shape. For 1.21.6 and
|
||||||
// later; glass_pre_1_21_6.fsh (with glass.json, the program 1.21.4 loads) is for older versions.
|
// later; glass_pre_1_21_6.fsh (with glass.json, the program 1.21.4 loads) is for older versions.
|
||||||
|
|
||||||
// Vanilla's own, since its layout changes between versions (1.21.11 dropped LineWidth)
|
// Vanilla's transforms, laid out as the version has them: 1.21.6 to 1.21.10 end with LineWidth, which
|
||||||
#moj_import <minecraft:dynamictransforms.glsl>
|
// 1.21.11 dropped (GlassRenderer defines HAS_LINE_WIDTH there). Not imported: the include only exists
|
||||||
|
// from 1.21.6, and 1.21.4 and 1.21.5 still read every shader's imports while loading resources.
|
||||||
|
layout(std140) uniform DynamicTransforms {
|
||||||
|
mat4 ModelViewMat;
|
||||||
|
vec4 ColorModulator;
|
||||||
|
vec3 ModelOffset;
|
||||||
|
mat4 TextureMat;
|
||||||
|
#ifdef HAS_LINE_WIDTH
|
||||||
|
float LineWidth;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
// The panel's rounded rectangle, the same texture its background is drawn with
|
// The panel's rounded rectangle, the same texture its background is drawn with
|
||||||
uniform sampler2D Sampler0;
|
uniform sampler2D Sampler0;
|
||||||
|
|||||||
Reference in New Issue
Block a user