-
Notifications
You must be signed in to change notification settings - Fork 235
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
Consider including support for KHR_lights #70
Comments
Cool, by looking at https://learnopengl.com/PBR/Lighting I made more changes to my work-in-progress adaptation However - I'm still confused how to add the IBL without a directional light. For now I just hardcoded a default value independant of the KHR/Punctual lights. If someone could take a look at either repo and advise how to calculate the IBL without a directional light, I'd appreciate it! Thanks :) |
Thanks @pjcozzi ! FYI I deleted and edited some of my questions above to keep the discussion focused on implementing lighting for this reference shader - since I'm seeing some of my questions were kinda basic/general :) (though if someone happens to know how I can get a direction vector from a light object's transformation matrix or quaternion, independent of position - e.g. for a directional light, I'd love to know... been like 6 hours and I'm still not getting it right hehe) |
@dakom None of the light-dependent members of the pbrInputs struct are actually used in the IBL contribution; either using a dummy light vector or writing a new version that just has the view & surface dependent values should do what you want. (just to make sure I'm answering the right question...you want to call getIBLContribution without having a light in the scene, right?) |
Oh, @snagy you're 100% right - I missed that I've updated my adaptation to separate those values out and the IBL works fine without punctual lights. Thanks! |
Once the draft extension is finalized, it might be worth including support for KHR_lights here.
The text was updated successfully, but these errors were encountered: