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

Edges of brdfLUT.png are discontinuous #21

Closed
emackey opened this issue Jun 12, 2017 · 3 comments
Closed

Edges of brdfLUT.png are discontinuous #21

emackey opened this issue Jun 12, 2017 · 3 comments
Labels

Comments

@emackey
Copy link
Member

emackey commented Jun 12, 2017

Looking at the brdfLUT.png map (the original one, not the modified one in #18), @abwood and I experimented with contrast-enhancing the image to look for irregularities. All four borders of the image have 1-pixel-thick discontinuous irregularities. In a few cases, such as the lower-right and lower-left corners, these are visible to a trained naked eye. But with contrast adjustments, a 1-pixel border around the entire image becomes visible.

I will try to post some screenshots of these findings later today or tomorrow. In the meantime, I'm curious how this image was created, if it can be regenerated, or if the repo here could actually generate this image with a pre-render pass at runtime?

/cc @moneimne

@emackey emackey added the bug label Jun 12, 2017
@moneimne
Copy link
Contributor

I initially was using a BRDF LUT generated from IBLBaker, but it caused odd banding artifacts, so I found one from another source.

Since there is an issue in confidence with obtaining a LUT from another source, I think we should just generate one ourselves. Unreal Engine explains the details in their Real Shading in Unreal Engine 4 paper. Their explanation on specular BRDF integration starts at page 6.

@emackey
Copy link
Member Author

emackey commented Jun 12, 2017

@moneimne I found a post on gamedev where someone attempts to port the shaders from your link of the UE4 paper over to GLSL. But they're using uint and bitwise operators, which doesn't work in WebGL 1. Maybe WebGL 2 supports it?

@moneimne
Copy link
Contributor

According to the reference card, WebGL 2 uses GLESSL 3.0, which supports unsigned integers and bitwise operations!

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

2 participants