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

Fix PBR Reflections #2599

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

Conversation

jasonjgardner
Copy link

This commit ought to help with the reflections in the Material Preview. Here's what has changed:

  • Added normalScale to flip the normal map to use right-handed (DirectX) normal maps for RenderDragon compatibility.
  • Only use PMREM when a PreviewScene has been activated.
  • Now using .texture property for the envMap
  • Update environment map when the material is updated. (User may have changed scene in between material updates.)

Upon initially loading a scene, the environment may appear too dark without a cubemap preset. The scene's lights will still reflect off the model without the cubemap.

image

Here is the reflection with a preview scene activated and the material updated.

image

Screen.Recording.2024-12-22.142857.mp4

Copy link

netlify bot commented Dec 22, 2024

Deploy Preview for blockbench-dev ready!

Name Link
🔨 Latest commit 85f4eab
🔍 Latest deploy log https://app.netlify.com/sites/blockbench-dev/deploys/67695cb6cae31b0008685e82
😎 Deploy Preview https://deploy-preview-2599--blockbench-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@jasonjgardner jasonjgardner marked this pull request as draft December 23, 2024 11:51
@jasonjgardner
Copy link
Author

Converting this to a draft after finding a couple problems in MER processing.

Corrected normal scale once more to match DirectX style.
Updated MER processing logic to:
- Use green channel as a mask instead of value
- Add roughness multiplier when MER is present
@jasonjgardner jasonjgardner marked this pull request as ready for review December 23, 2024 12:37
@jasonjgardner
Copy link
Author

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.

1 participant