Skip to content

Commit 0709a0b

Browse files
stupid typo spoiling normals fixed, added a 720p render mode in ditt.zip
1 parent 06129d2 commit 0709a0b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples_tests/22.RaytracedAO/raytraceCommon.glsl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ nbl_glsl_xoroshiro64star_state_t load_aux_vertex_attrs(
186186
normalizedN.x = dot(batchInstanceData.normalMatrixRow0,normal);
187187
normalizedN.y = dot(batchInstanceData.normalMatrixRow1,normal);
188188
normalizedN.z = dot(batchInstanceData.normalMatrixRow2,normal);
189-
normalizedN = normalize(normal);
189+
normalizedN = normalize(normalizedN);
190190

191191
return scramble_start_state;
192192
}
@@ -266,7 +266,7 @@ for (uint i=1u; i!=vertex_depth; i++)
266266
// TODO: investigate why we can't use `normalizedN` here
267267
const vec3 ray_offset_vector = normalize(cross(dPdBary[0],dPdBary[1]))*inversesqrt_precision;
268268
float origin_offset = nbl_glsl_numeric_limits_float_epsilon(44u); // I pulled the constants out of my @$$
269-
origin_offset += dot(abs(ray_offset_vector),abs(origin))*nbl_glsl_numeric_limits_float_epsilon(24u);
269+
origin_offset += dot(abs(ray_offset_vector),abs(origin))*nbl_glsl_numeric_limits_float_epsilon(32u);
270270
// TODO: in the future run backward error analysis of
271271
// dot(mat3(WorldToObj)*(origin+offset*geomNormal/length(geomNormal))+(WorldToObj-vx_pos[1]),geomNormal)
272272
// where

examples_tests/media/mitsuba/ditt.zip

692 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)