File tree Expand file tree Collapse file tree
glsl/chunks/standard/frag
wgsl/chunks/standard/frag Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,13 +5,11 @@ export default /* glsl */`
55 // globals
66 float dAlpha = 1.0;
77
8- #if defined(LIT_ALPHA_TEST)
9- #include "alphaTestPS"
10- #endif
11-
12- // dithering
13- #if STD_OPACITY_DITHER != NONE
14- #include "opacityDitherPS"
8+ // all passes handle opacity
9+ #if LIT_BLEND_TYPE != NONE || defined(LIT_ALPHA_TEST) || defined(LIT_ALPHA_TO_COVERAGE) || STD_OPACITY_DITHER != NONE
10+ #ifdef STD_OPACITY_TEXTURE_ALLOCATE
11+ uniform sampler2D texture_opacityMap;
12+ #endif
1513 #endif
1614
1715 #ifdef FORWARD_PASS // ----------------
Original file line number Diff line number Diff line change @@ -3,10 +3,16 @@ export default /* glsl */`
33
44 // all passes handle opacity
55 #if LIT_BLEND_TYPE != NONE || defined(LIT_ALPHA_TEST) || defined(LIT_ALPHA_TO_COVERAGE) || STD_OPACITY_DITHER != NONE
6- #ifdef STD_OPACITY_TEXTURE_ALLOCATE
7- uniform sampler2D texture_opacityMap;
8- #endif
96 #include "opacityPS"
7+
8+ #if defined(LIT_ALPHA_TEST)
9+ #include "alphaTestPS"
10+ #endif
11+
12+ // dithering
13+ #if STD_OPACITY_DITHER != NONE
14+ #include "opacityDitherPS"
15+ #endif
1016 #endif
1117
1218 #ifdef FORWARD_PASS // ----------------
Original file line number Diff line number Diff line change @@ -5,13 +5,12 @@ export default /* wgsl */`
55 // globals
66 var<private> dAlpha: f32 = 1.0;
77
8- #if defined(LIT_ALPHA_TEST)
9- #include "alphaTestPS"
10- #endif
11-
12- // dithering
13- #if STD_OPACITY_DITHER != NONE
14- #include "opacityDitherPS"
8+ // all passes handle opacity
9+ #if LIT_BLEND_TYPE != NONE || defined(LIT_ALPHA_TEST) || defined(LIT_ALPHA_TO_COVERAGE) || STD_OPACITY_DITHER != NONE
10+ #ifdef STD_OPACITY_TEXTURE_ALLOCATE
11+ var texture_opacityMap : texture_2d<f32>;
12+ var texture_opacityMapSampler : sampler;
13+ #endif
1514 #endif
1615
1716 #ifdef FORWARD_PASS // ----------------
Original file line number Diff line number Diff line change @@ -3,11 +3,16 @@ export default /* wgsl */`
33
44 // all passes handle opacity
55 #if LIT_BLEND_TYPE != NONE || defined(LIT_ALPHA_TEST) || defined(LIT_ALPHA_TO_COVERAGE) || STD_OPACITY_DITHER != NONE
6- #ifdef STD_OPACITY_TEXTURE_ALLOCATE
7- var texture_opacityMap : texture_2d<f32>;
8- var texture_opacityMapSampler : sampler;
9- #endif
106 #include "opacityPS"
7+
8+ #if defined(LIT_ALPHA_TEST)
9+ #include "alphaTestPS"
10+ #endif
11+
12+ // dithering
13+ #if STD_OPACITY_DITHER != NONE
14+ #include "opacityDitherPS"
15+ #endif
1116 #endif
1217
1318 #ifdef FORWARD_PASS // ----------------
You can’t perform that action at this time.
0 commit comments