Skip to content

Commit

Permalink
Adapt length of coordinates list #7
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorianK13 authored May 6, 2024
1 parent 4ab4001 commit 8634be3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rayTracingWebGL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export function rayTracingWebGL(
var colorCodedArray = null;
var isShadowedArray = null;
for (var i = 0; i < sunDirections.length; i += 3) {
progressCallback(i, sunDirections.length);
progressCallback(i, sunDirections.length/3);
// TODO: Iterate over sunDirection
let sunDirectionUniformLocation = gl.getUniformLocation(program, 'u_sun_direction');
gl.uniform3fv(sunDirectionUniformLocation, [sunDirections[i], sunDirections[i + 1], sunDirections[i + 2]]);
Expand Down

0 comments on commit 8634be3

Please sign in to comment.