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

IBLBaker returns .dds with negative float values #19

Open
musicaljelly opened this issue Jan 9, 2023 · 2 comments
Open

IBLBaker returns .dds with negative float values #19

musicaljelly opened this issue Jan 9, 2023 · 2 comments

Comments

@musicaljelly
Copy link

musicaljelly commented Jan 9, 2023

I have a .hdr file that when run through IBLBaker produces an output image containing negative values. For the image I tried, this is specifically only in the green channel. These negative values result in artifacts when I go on to BC6H-compress the images IBLBaker produces (bright green splotches in this case). I assume it's not expected that any of IBLBaker's output images should contain negative values?

The source .hdr
The output specular HDR map containing negative values

The diffuse HDR map and EnvHDR map appear to be fine. I haven't looked at the MDR maps as I don't use them.

My settings:
IBLBaker settings

Let me know if there's any additional information I can provide.

@musicaljelly
Copy link
Author

Commenting out the hue and saturation adjustment code in ImportanceSamplingSpecular.fx (lines 169-190) appears to resolve the issue. So the culprit probably lies in those ~6 lines of code.

@derkreature
Copy link
Owner

Yeah, good catch! That code was implemented to mess with LDR cubemaps back around 2012 :)

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

No branches or pull requests

2 participants