1
$\begingroup$

Im trying to create a light source within a shader, this light source needs to be in object space.

I have created a node network that does this well, but only uses the mesh normals (in object space), i thought adding the normal map would be simple but im struggling to get something that works correctly and have with help over engineered several solutions including recreating a TBN matrix (think this didn't work as the tangents didn't appear as i would expect them)

however im thinking there must be a simpler solution that im missing? get pixels normal (mesh + map), transform to local space, do stuff?...

$\endgroup$
0
$\begingroup$

its very simple, the normalmap output in tangent mode does exactly what i was looking for, i was being dumb, i had refactored my node networks into a bunch of nested groups and one of the inputs had set the normal intput to a float instead of a vector...

it took me to recreate the entire normal tbn matrix in nodes and debug the out put vs the normalmap node to realise ;)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.