Skip to content

Commit

Permalink
Do not write to v_MaterialAlphaCutoff in opaque render passes (#2271)
Browse files Browse the repository at this point in the history
Fixes a compiler shader warning on some platforms. And is more hygienic.
  • Loading branch information
douira authored Jan 25, 2024
1 parent eec8380 commit ff7464d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ out vec4 v_Color;
out vec2 v_TexCoord;

out float v_MaterialMipBias;
#ifdef USE_FRAGMENT_DISCARD
out float v_MaterialAlphaCutoff;
#endif

#ifdef USE_FOG
out float v_FragDistance;
Expand Down Expand Up @@ -52,5 +54,7 @@ void main() {
v_TexCoord = _vert_tex_diffuse_coord;

v_MaterialMipBias = _material_mip_bias(_material_params);
#ifdef USE_FRAGMENT_DISCARD
v_MaterialAlphaCutoff = _material_alpha_cutoff(_material_params);
#endif
}

0 comments on commit ff7464d

Please sign in to comment.