Skip to content

Commit 1684af8

Browse files
committed
Remove unused function
1 parent 0a22681 commit 1684af8

File tree

2 files changed

+2
-37
lines changed

2 files changed

+2
-37
lines changed

src/shader/shaderLightSampling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ LightSampleRec lightsClosestHit( sampler2D lights, uint lightCount, vec3 rayOrig
6161
continue;
6262
}
6363
64-
// TODO: why are u and v and divided by their length here?
64+
// TODO: why are u and v and divided by their length sq here?
6565
u *= 1.0 / dot( u, u );
6666
v *= 1.0 / dot( v, v );
6767
@@ -78,7 +78,7 @@ LightSampleRec lightsClosestHit( sampler2D lights, uint lightCount, vec3 rayOrig
7878
7979
lightSampleRec.hit = true;
8080
lightSampleRec.dist = dist;
81-
lightSampleRec.pdf = ( dist * dist ) / ( light.area * cosTheta );
81+
lightSampleRec.pdf = 1.0;
8282
lightSampleRec.emission = light.color * light.intensity;
8383
lightSampleRec.direction = rayDirection;
8484

src/shader/shaderStructs.js

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -304,39 +304,4 @@ export const shaderLightStruct = /* glsl */ `
304304
305305
};
306306
307-
SpotLight readSpotLightInfo( sampler2D tex, uint index ) {
308-
309-
uint i = index * 6u;
310-
311-
vec4 s0 = texelFetch1D( tex, i + 0u );
312-
vec4 s1 = texelFetch1D( tex, i + 1u );
313-
vec4 s2 = texelFetch1D( tex, i + 2u );
314-
vec4 s3 = texelFetch1D( tex, i + 3u );
315-
vec4 s4 = texelFetch1D( tex, i + 4u );
316-
vec4 s5 = texelFetch1D( tex, i + 5u );
317-
318-
SpotLight sl;
319-
sl.position = s0.rgb;
320-
sl.type = int( round( s0.a ) );
321-
322-
sl.color = s1.rgb;
323-
sl.intensity = s1.a;
324-
325-
sl.u = s2.rgb;
326-
sl.v = s3.rgb;
327-
sl.area = s3.a;
328-
329-
sl.radius = s4.r;
330-
sl.near = s4.g;
331-
sl.decay = s4.b;
332-
sl.distance = s4.a;
333-
334-
sl.coneCos = s5.r;
335-
sl.penumbraCos = s5.g;
336-
sl.iesProfile = int( round ( s5.b ) );
337-
338-
return sl;
339-
340-
}
341-
342307
`;

0 commit comments

Comments
 (0)