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

Add constraint to prevent more than one normal map per drawable #462

Open
xeolabs opened this issue Mar 16, 2016 · 0 comments
Open

Add constraint to prevent more than one normal map per drawable #462

xeolabs opened this issue Mar 16, 2016 · 0 comments

Comments

@xeolabs
Copy link
Owner

xeolabs commented Mar 16, 2016

For each drawable, only use the normal map texture node that's closest to the geometry on the parent node path.

Reasons

  • A single pre-generated tangent array is given to the vertex shader, for the UV layer that's used for morphing.
  • The vertex stage generates the tangent-bitangent-normal matrix.
  • The vertex state multiplies the View-space eye vector by that matrix, then passes the tangent-space eye vector to the fragment stage as a varying.

Therefore, were we to support multiple normal maps, we would need a varying for an eye vector for each of those normal maps, which we can't afford.

There are no use cases for multiple normal maps anyway.

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

No branches or pull requests

1 participant