Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pbr.frag DEBUG_NORMAL output's the normal map, or a a static value. #265

Closed
slicer4ever opened this issue May 11, 2020 · 2 comments · Fixed by ux3d/glTF-Sample-Viewer#1 or #280
Closed
Labels

Comments

@slicer4ever
Copy link

right now

#ifdef DEBUG_NORMAL
either outputs the normal map value, or outputs a static value instead of n's actual value.

I'd suggest splitting this into DEBUG_NORMAL and DEBUG_NORMALMAP where the latter will output the normal map value for the fragment, and DEBUG_NORMAL will output the actual transformed normal value.

@UX3D-nopper
Copy link
Contributor

The normal needs to by transformed back to tangent-space to be compliant with the normal map.
Or we render the object-space normal. Hmm, but the world-normal could be interesting as well.

@slicer4ever
Copy link
Author

I cloned the repo and made it output the world-normals, As i'm trying to debug why my IBL code seems to be producing different results, I was trying to compare all the inputs to figure out my mistake and noticed this when going over the viewer's shader code. I think having world-normals as a debug option would help anyone in a similar situation as mine that wants to make sure their model's normal's are being transformed correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants