-
Notifications
You must be signed in to change notification settings - Fork 240
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
Additional work to README appendix #53
Conversation
Update some of the equations in the analytic appendix; include the base lighting model, added the missing microfacet and lambertian diffuse, removed outdated output gifs
Great to see this project get some attention. @moneimne Are you still available to take a peek at this sometime? |
My bandwidth for the next month is going to be very limited, so hopefully I'll be able to contribute after then! |
OK. @abwood any thoughts? |
@snagy One thing I noticed is the metal/rough images still show metallic in the red channel instead of blue. I know you didn't touch that here, but something to consider. |
This is great, adding a much needed intro for the appendix, thanks @snagy! Lets fix the metal/rough images in a separate issue/pr. |
Fix up the sRGB handling to properly light in linear space. Also fixed sRGB on platforms that don't support the SRGB extension.
put the right cutoff value in for srgb! don't know where the old one came from.
main.js
Outdated
@@ -152,7 +150,7 @@ function init(vertSource, fragSource) { | |||
scene: null, | |||
hasLODExtension:gl.getExtension('EXT_shader_texture_lod'), | |||
hasDerivativesExtension:gl.getExtension('OES_standard_derivatives'), | |||
sRGBifAvailable: (hasSRGBExt ? hasSRGBExt.SRGB_EXT : gl.RGBA) | |||
hasSRGBExt:gl.getExtension('EXT_SRGB') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, looks like a bugfix of mine is being un-done here. The SRGB_EXT
extension is not supported on several browsers, did you test this on multiple browsers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, we shouldn't mix code changes and the readme update in the same branch/PR, as it mixes the reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, not sure why these changes got pulled into this PR. i'll back this out.
Thanks for the reviews. I'm going to pull this text into the core glTF 2.0 spec appendix about pbr. |
Added the Schlick BRDF model, the microfacet distribution and the Lambert diffuse to the README.
Also removed the rendered output gifs; they're out of date, and I want to encourage people to just look at the sample instead of maintaining those.