Skip to content

Commit

Permalink
stf_compat.frag: work around possible shader compilation error
Browse files Browse the repository at this point in the history
  • Loading branch information
fo76utils authored Nov 15, 2024
1 parent de109e2 commit 6478b5a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion res/stf_compat.frag
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,9 @@ void main()
vec3 emissive = vec3(0.0);
vec3 transmissive = vec3(0.0);
float falloffLayerMask = float(lm.layeredEdgeFalloff.flags);
int numLayers = int( min( lm.numLayers, 6 ) );
int numLayers = lm.numLayers;
if ( numLayers > 6 )
numLayers = 6;

for ( int i = 0; i < numLayers; i++ ) {
vec3 layerBaseMap = vec3(0.0);
Expand Down

0 comments on commit 6478b5a

Please sign in to comment.