@@ -133,7 +133,7 @@ const ShaderStageSpecification PLAIN_RENDERIMAGE_TEXTURE_DRAW_FRAG_SHADER = {
133133 {" u_projMatrix" , RenderDataType::Matrix44Float},
134134 {" u_invProjMatrix" , RenderDataType::Matrix44Float},
135135 {" u_viewport" , RenderDataType::Vector4Float},
136- {" u_transparency " , RenderDataType::Float},
136+ {" u_textureTransparency " , RenderDataType::Float},
137137 },
138138
139139 // attributes
151151 uniform mat4 u_projMatrix;
152152 uniform mat4 u_invProjMatrix;
153153 uniform vec4 u_viewport;
154- uniform float u_transparency ;
154+ uniform float u_textureTransparency ;
155155
156156 in vec2 tCoord;
157157 uniform sampler2D t_depth;
167167
168168 // Fetch values from texture
169169 float depth = texture(t_depth, tCoord).r;
170+
171+ ${ GLOBAL_FRAGMENT_FILTER_PREP }$
172+ ${ GLOBAL_FRAGMENT_FILTER }$
170173
171174 if(depth > LARGE_FLOAT()) {
172175 discard;
192195 ${ GENERATE_LIT_COLOR }$
193196
194197 // Set alpha
195- float alphaOut = u_transparency ;
198+ float alphaOut = u_textureTransparency ;
196199 ${ GENERATE_ALPHA }$
197200
198201 ${ PERTURB_LIT_COLOR }$
@@ -215,7 +218,7 @@ const ShaderStageSpecification PLAIN_RAW_RENDERIMAGE_TEXTURE_DRAW_FRAG_SHADER =
215218 {" u_projMatrix" , RenderDataType::Matrix44Float},
216219 {" u_invProjMatrix" , RenderDataType::Matrix44Float},
217220 {" u_viewport" , RenderDataType::Vector4Float},
218- {" u_transparency " , RenderDataType::Float},
221+ {" u_textureTransparency " , RenderDataType::Float},
219222 },
220223
221224 // attributes
233236 uniform mat4 u_projMatrix;
234237 uniform mat4 u_invProjMatrix;
235238 uniform vec4 u_viewport;
236- uniform float u_transparency ;
239+ uniform float u_textureTransparency ;
237240
238241 in vec2 tCoord;
239242 uniform sampler2D t_depth;
275278 ${ GENERATE_LIT_COLOR }$
276279
277280 // Set alpha
278- float alphaOut = u_transparency ;
281+ float alphaOut = u_textureTransparency ;
279282 ${ GENERATE_ALPHA }$
280283
281284 ${ PERTURB_LIT_COLOR }$
@@ -608,14 +611,14 @@ const ShaderReplacementRule TEXTURE_SET_TRANSPARENCY(
608611 /* rule name */ " TEXTURE_SET_TRANSPARENCY" ,
609612 { /* replacement sources */
610613 {" FRAG_DECLARATIONS" , R"(
611- uniform float u_transparency ;
614+ uniform float u_textureTransparency ;
612615 )" },
613616 {" TEXTURE_OUT_ADJUST" , R"(
614- textureOut = vec4(textureOut.rgb, textureOut.a * u_transparency );
617+ textureOut = vec4(textureOut.rgb, textureOut.a * u_textureTransparency );
615618 )" }
616619 },
617620 /* uniforms */ {
618- {" u_transparency " , RenderDataType::Float},
621+ {" u_textureTransparency " , RenderDataType::Float},
619622 },
620623 /* attributes */ {},
621624 /* textures */ {}
@@ -625,14 +628,14 @@ const ShaderReplacementRule TEXTURE_SET_TRANSPARENCY_PREMULTIPLIED(
625628 /* rule name */ " TEXTURE_SET_TRANSPARENCY_PREMULTIPLIED" ,
626629 { /* replacement sources */
627630 {" FRAG_DECLARATIONS" , R"(
628- uniform float u_transparency ;
631+ uniform float u_textureTransparency ;
629632 )" },
630633 {" TEXTURE_OUT_ADJUST" , R"(
631- textureOut *= u_transparency ;
634+ textureOut *= u_textureTransparency ;
632635 )" }
633636 },
634637 /* uniforms */ {
635- {" u_transparency " , RenderDataType::Float},
638+ {" u_textureTransparency " , RenderDataType::Float},
636639 },
637640 /* attributes */ {},
638641 /* textures */ {}
0 commit comments