-
Notifications
You must be signed in to change notification settings - Fork 19
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
Lights are imported with the default 1 meter near clip plane #90
Comments
Light clip near/far is not something that glTF specifies (as far as I know), but we could expose some settings to allow the user to control the near and far values used when creating a light. We could also default these to something other than their current defaults if there are more sensible values. For example, we could add a |
... A light on a wall can easily be as close as 1cm. |
The near distance doesn't affect how close to a wall a light can be. It just affects how close an object can be to a light source and still cast shadows. Placing the near plane too close will dramatically impact depth buffer precision and therefore shadow mapping quality. |
.... Like the shadows any lamp shade might cast? |
Those aren't likely to be within 1cm of the light source. For lights with such close casters, it would be necessary to tweak the near clip so that it's just barely within anything that might need to cast shadows. Generally, I would say that it's better to handle lamp shades via an IES profile (which also allows them to be partially translucent). But those are not currently supported / require a custom shader. |
... which is expected, I suppose, but this should probably be called out in documentation or something, since things closer than one meter then often end up rendering strangely.
The text was updated successfully, but these errors were encountered: