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

Missing metallitic and roughness map for screen space reflection? #23247

Closed
Pannic17 opened this issue Jan 16, 2022 · 4 comments
Closed

Missing metallitic and roughness map for screen space reflection? #23247

Pannic17 opened this issue Jan 16, 2022 · 4 comments
Labels

Comments

@Pannic17
Copy link

When using ssr pass in postprocessing, I noticed whatever the object added to the scene, the reflection of each mesh renders either very high or just none. Is there any ways or support for applying metalness map and roughness map to the ssr pass for pbr?

@Mugen87
Copy link
Collaborator

Mugen87 commented Jan 16, 2022

/ping @gonnavis

@gonnavis
Copy link
Contributor

gonnavis commented Jan 16, 2022

Hello @Pannic17 . I tried it, but currently too difficult for me to correctly integrate pbr, I need to have a deeper understanding of pbr to complete this feature.
However, at present this new pr (demo) can at least adjust the intensity of each object separately, but it has not been merged. If necessary, you can merge it yourself locally.

@Mugen87 Mugen87 added the Addons label Jan 16, 2022
@Pannic17
Copy link
Author

Pannic17 commented Jan 17, 2022

Thanks @gonnavis, your code helped a lot. Base on your new pr and I just found that in SSRShader, the wrong channel of metalness map was used to generate ssr.
float metalness=texture2D(tMetalness,vUv).r;
In main of fragment shader, the red channel of metalness map was used, which should be the blue channel. The red channel is for AO.
float metalness=texture2D(tMetalness,vUv).b;
After I corrected this, it seems ssr generated according to the correct metalness map, however, the roughnes still remain unaffected. Looking forward for solution for that

@gonnavis
Copy link
Contributor

Thanks! I'll check.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants