ands / lightmapper

A C/C++ single-file library for drop-in lightmap baking. Just use your existing OpenGL renderer to bounce light!
1.41k stars 133 forks source link

Duplicate Normalize line in the lightmapper code #20

Open noisecrime opened 2 years ago

noisecrime commented 2 years ago

Hi,

Been looking through the code and came across this in lightmapper.h

569: ctx->meshPosition.sample.direction = lm_normalize3(lm_add3(n0, lm_add3(lm_scale3(nv2, uv.x), lm_scale3(nv1, uv.y)))); 570: ctx->meshPosition.sample.direction = lm_normalize3(ctx->meshPosition.sample.direction);

Unless I'm reading this wrong it looks to me like a typo as direction is being normalized twice. So I imagine line 570 can just be removed or commented out.