Skip to content

Commit

Permalink
fix forward clusters spotDir & spotBlend
Browse files Browse the repository at this point in the history
  • Loading branch information
e2002e committed Feb 14, 2024
1 parent 98e8caf commit 95de89e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Shaders/std/light.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
uniform sampler2DShadow shadowMapAtlasSpot;
#endif
#else
uniform sampler2DShadow shadowMapSpot[maxLightsCluster];
uniform sampler2DShadow shadowMapSpot[4];
#endif
uniform mat4 LWVPSpotArray[maxLightsCluster];
#endif
Expand Down
4 changes: 2 additions & 2 deletions blender/arm/material/make_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def write(vert: shader.Shader, frag: shader.Shader):
if '_Spot' in wrd.world_defs:
frag.write('\t, lightsArray[li * 3 + 2].y != 0.0')
frag.write('\t, lightsArray[li * 3 + 2].y') # spot size (cutoff)
frag.write('\t, lightsArraySpot[li].w') # spot blend (exponent)
frag.write('\t, lightsArraySpot[li].xyz') # spotDir
frag.write('\t, lightsArraySpot[li * 2].w') # spot blend (exponent)
frag.write('\t, lightsArraySpot[li * 2].xyz') # spotDir
frag.write('\t, vec2(lightsArray[li * 3].w, lightsArray[li * 3 + 1].w)') # scale
frag.write('\t, lightsArraySpot[li * 2 + 1].xyz') # right
if '_VoxelShadow' in wrd.world_defs and '_VoxelAOvar' in wrd.world_defs:
Expand Down

0 comments on commit 95de89e

Please sign in to comment.