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

Set a unit for lighting. #142

Open
schell opened this issue Dec 6, 2024 · 0 comments
Open

Set a unit for lighting. #142

schell opened this issue Dec 6, 2024 · 0 comments
Labels
todo TODO: ...

Comments

@schell
Copy link
Owner

schell commented Dec 6, 2024

We don't yet use a unit for our lighting, and we should.
https://www.realtimerendering.com/blog/physical-units-for-lights/
NOTE:
glTF spec [1] says directional light is in lux, whereas spot and point are
in candelas. I haven't really set a unit, it's implicit in the shader, but it seems we
can roughly get candelas from lux by dividing by 683 [2].

  1. https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual/README.md
  2. https://depts.washington.edu/mictech/optics/me557/Radiometry.pdf
    // TODO: Set a unit for lighting.
    // We don't yet use a unit for our lighting, and we should.
    // NOTE:
    // glTF spec [1] says directional light is in lux, whereas spot and point are
    // in candelas. I haven't really set a unit, it's implicit in the shader, but it seems we
    // can roughly get candelas from lux by dividing by 683 [2].
    // 1. https://github.com/KhronosGroup/glTF/blob/main/extensions/2.0/Khronos/KHR_lights_punctual/README.md
    // 2. https://depts.washington.edu/mictech/optics/me557/Radiometry.pdf
    intensity: intensity / 683.0,
    });
@schell schell added the todo TODO: ... label Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo TODO: ...
Projects
None yet
Development

No branches or pull requests

1 participant