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

[PBR][IBL] render an equirectangular image to cubemap #1390

Merged
merged 8 commits into from
Jul 28, 2021
Merged

Conversation

bigbike
Copy link
Contributor

@bigbike bigbike commented Jul 16, 2021

Motivation and Context

As titled.
Given an HDRi image, we would like to use it as the "envionment" to light up the scene.
The 1st step is to render it to a cubemap.

This shader is to do it, and it will be used later in the PbrImageBasedLighting class.

How Has This Been Tested

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have completed my CLA (see CONTRIBUTING)
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jul 16, 2021
@bigbike
Copy link
Contributor Author

bigbike commented Jul 16, 2021

lythwood_room

Picture is from: https://polyhaven.com/

CC0 license, completely free. see details here:
https://polyhaven.com/license

The cubemap results (Yes, they are up-side-down, which is totally CORRECT) :
environment rgba mip_2 -Z
environment rgba mip_2 +Z
environment rgba mip_2 -Y
environment rgba mip_2 +Y
environment rgba mip_2 -X
environment rgba mip_2 +X

All the functions are fully tested in the "ibl" branch.
see #1389

@bigbike bigbike merged commit 2ab9066 into master Jul 28, 2021
@bigbike bigbike deleted the tocube branch July 28, 2021 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants