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

Consider including support for KHR_lights #70

Closed
donmccurdy opened this issue Feb 25, 2018 · 5 comments
Closed

Consider including support for KHR_lights #70

donmccurdy opened this issue Feb 25, 2018 · 5 comments

Comments

@donmccurdy
Copy link

Once the draft extension is finalized, it might be worth including support for KHR_lights here.

@dakom
Copy link

dakom commented Jul 1, 2018

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 :)

@pjcozzi
Copy link
Member

pjcozzi commented Jul 3, 2018

@dakom thanks for your effort, I'll ask around if anyone can take a look. Perhaps @emackey, @snagy, or others.

@dakom
Copy link

dakom commented Jul 3, 2018

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)

@snagy
Copy link
Contributor

snagy commented Jul 3, 2018

@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?)

@dakom
Copy link

dakom commented Jul 3, 2018

Oh, @snagy you're 100% right - I missed that NdotV and reflection didn't actually depend on the example directional light at all.

I've updated my adaptation to separate those values out and the IBL works fine without punctual lights.

Thanks!

emackey pushed a commit that referenced this issue Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants