Skip to content

Commit 0fc190c

Browse files
committed
Fix wrongly merged shader
1 parent 4a67afb commit 0fc190c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

data/shaders/pointlight.frag

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,6 @@ void main()
4444
att *= (radius - d) / radius;
4545
if (att <= 0.) discard;
4646

47-
// Spotlight
48-
float sscale = direction_scale_offset.z;
49-
if (sscale != 0.)
50-
{
51-
vec3 sdir = vec3(direction_scale_offset.xy, 0.);
52-
sdir.z = sqrt(1. - dot(sdir, sdir)) * sign(sscale);
53-
sdir = (u_view_matrix * vec4(sdir, 0.0)).xyz;
54-
vec3 light_to_frag = light_pos - xpos.xyz;
55-
float offset = direction_scale_offset.w;
56-
float sattenuation = clamp(dot(-sdir, normalize(light_to_frag)) *
57-
abs(sscale) + offset, 0.0, 1.0);
58-
att *= sattenuation * sattenuation;
59-
}
60-
if (att <= 0.) discard;
61-
6247
// Light Direction
6348
vec3 L = light_to_frag / d;
6449
// Spotlight

0 commit comments

Comments
 (0)