We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4a67afb commit 0fc190cCopy full SHA for 0fc190c
data/shaders/pointlight.frag
@@ -44,21 +44,6 @@ void main()
44
att *= (radius - d) / radius;
45
if (att <= 0.) discard;
46
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
-
62
// Light Direction
63
vec3 L = light_to_frag / d;
64
// Spotlight
0 commit comments