Skip to content

Commit 93e4a46

Browse files
Removed unnecessary line
1 parent 9a47337 commit 93e4a46

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/shaders/common/sampling.glsl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ float powerHeuristic(float a, float b)
191191
void sampleSphereLight(in Light light, in vec3 surfacePos, inout LightSampleRec lightSampleRec)
192192
//-----------------------------------------------------------------------
193193
{
194-
//TODO: Pick a point only on the visible surface of the sphere
194+
// TODO: Pick a point only on the visible surface of the sphere
195195

196196
float r1 = rand();
197197
float r2 = rand();
@@ -201,7 +201,6 @@ void sampleSphereLight(in Light light, in vec3 surfacePos, inout LightSampleRec
201201
lightSampleRec.dist = length(lightSampleRec.direction);
202202
float distSq = lightSampleRec.dist * lightSampleRec.dist;
203203
lightSampleRec.direction /= lightSampleRec.dist;
204-
lightSampleRec.direction / lightSampleRec.direction;
205204
lightSampleRec.normal = normalize(lightSurfacePos - light.position);
206205
lightSampleRec.emission = light.emission * float(numOfLights);
207206
lightSampleRec.pdf = distSq / (light.area * abs(dot(lightSampleRec.normal, lightSampleRec.direction)));

0 commit comments

Comments
 (0)