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

Added AlternativeNormalPass option for StandardEffects #22

Closed
wants to merge 3 commits into from

Conversation

giulioz
Copy link
Member

@giulioz giulioz commented May 19, 2020

As shown in Issue #18, when you combine instancing and SSAO the rendering breaks, since it uses internally scene.overrideMaterial. It's not possible to use a single material for instanced and non instanced objects, since the program attributes are different.

I've noticed that using this approach it's pretty difficult to make a fix, so I've found an hack: you can render a Normal Map, even with instancing, only if you use separate MeshNormalMaterials, traversing the scene tree and temporarily exchanging the materials.

I acknowledge that this can be a corner case or an hack, but it may be useful for someone…

@drcmda
Copy link
Member

drcmda commented May 29, 2020

Could you put this one into react-postprocessing instead? I'll remove standardeffects when it's out

@giulioz giulioz closed this May 29, 2020
@giulioz
Copy link
Member Author

giulioz commented May 29, 2020

I'll open an issue, since it's more complicated that that unfortunately…

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.

None yet

2 participants