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

Wrap getIBLContribution with #ifdef USE_IBL #82

Merged
merged 1 commit into from
Jun 1, 2018
Merged

Wrap getIBLContribution with #ifdef USE_IBL #82

merged 1 commit into from
Jun 1, 2018

Conversation

Lunarsong
Copy link
Contributor

Without this the shader may fail compilation because the uniforms used in the getIBLContribution function are not being declared.

@emackey
Copy link
Member

emackey commented May 31, 2018

Thanks @Lunarsong. Do you want to wrap uniform vec4 u_ScaleIBLAmbient; in that as well?

@Lunarsong
Copy link
Contributor Author

I'm not sure. How will it affect the stuff on the main.js? My web dev is quite weak so I honestly don't know :) I noticed the shader issue when using it locally in a C program.

I see main.js is referencing u_ScaleIBLAmbient in lines 200 and 282. Is it going to be happy with them removed?
https://github.com/KhronosGroup/glTF-WebGL-PBR/blob/c28b5b8f5a83380857ad8395ac5302594ecc13ae/main.js#L200

Unlike the function which used the missing sampler, keeping these uniforms in won't break compilation.

@emackey
Copy link
Member

emackey commented Jun 1, 2018

@Lunarsong You're right, the web side isn't set up to actually remove IBL like that. We'll take this as-is, thanks!

If you're building anything cool with glTF that you're allowed to talk about, please let us know!

@emackey emackey merged commit 88eda8c into KhronosGroup:master Jun 1, 2018
@Lunarsong
Copy link
Contributor Author

Thanks for merging! I'm working on a game, but it's a side project while maintaining full time job... Hope to get enough progress to share more :) Where should I mention it?

@emackey
Copy link
Member

emackey commented Jun 4, 2018

We've been tracking the latest glTF projects in KhronosGroup/glTF#1058. Finished projects are intended to end up in the main README.md.

@Lunarsong
Copy link
Contributor Author

Thanks! :)

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

Successfully merging this pull request may close these issues.

2 participants