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

EquirectEnvInfoUniform: Sampling with 1 x 1 images seems to be wrong #541

Open
gkjohnson opened this issue Feb 20, 2024 · 3 comments
Open
Labels
bug Something isn't working
Milestone

Comments

@gkjohnson
Copy link
Owner

When creating a 1, 1 white texture for the environment map we get this strange split:

image
@gkjohnson gkjohnson added the bug Something isn't working label Feb 20, 2024
@gkjohnson gkjohnson added this to the v0.0.20 milestone Feb 20, 2024
@gkjohnson
Copy link
Owner Author

This seems to be an issue related to MIS? Disabling MIS "fixes" the problem

@gkjohnson
Copy link
Owner Author

This line seems to be he issue?

result = attenuatedColor * environmentIntensity * envColor * state.throughputColor * sampleColor * misWeight / envPdf;

@gkjohnson
Copy link
Owner Author

Textures are not capable of sampling the first or last pixel due to the way the the samples are stored. With 1x1 px we get a marginal weights texture that is 1 px wide storing 0.5 which means only one direction can ever be sampled. The way weights are stored should be adjusted such that the first pixel is always the first valid pixel to sample and the last pixel is that last valid pixel to sample.

@gkjohnson gkjohnson modified the milestones: v0.0.21, v0.0.22 Feb 23, 2024
@gkjohnson gkjohnson modified the milestones: v0.0.22, v0.0.23 May 2, 2024
@gkjohnson gkjohnson modified the milestones: v0.0.23, v0.0.24 Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant