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

NME: Fix and improve the HeightToNormal block #13171

Merged
merged 4 commits into from
Oct 26, 2022
Merged

NME: Fix and improve the HeightToNormal block #13171

merged 4 commits into from
Oct 26, 2022

Conversation

Popov72
Copy link
Contributor

@Popov72 Popov72 commented Oct 26, 2022

The position/normal/tangent inputs have been renamed to worldPosition/worldNormal/worldTangent and the old output output has been renamed xyz (the output output is now a vec4).

I didn't add code to keep back compat as this is a new block in 6.0 and probably few people have used it until now. Feel free to complain about this and I may revise my judgement :)

Note also that worldNormal and worldTangent must be normalized! I added two switches to allow for easy normalization for the user.

The new "Generate in world space" mode allows to generate a normal which is directly usable as the worldNormal input of the PBRMetallicRoughness/Light block without the need for a PerturbNormal block.

@azure-pipelines
Copy link

Please make sure to label your PR with "bug", "new feature" or "breaking change" label(s).
To prevent this PR from going to the changelog marked it with the "skip changelog" label.

@sebavan sebavan enabled auto-merge October 26, 2022 17:32
@sebavan sebavan merged commit b64fd9e into BabylonJS:master Oct 26, 2022
RaananW pushed a commit that referenced this pull request Dec 9, 2022
NME: Fix and improve the HeightToNormal block
Former-commit-id: f135868a43affcaac0c2a48dc591bd2c6434db7f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants