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

Fix switching scenes with different light objects #138

merged 2 commits into from Sep 27, 2021


Copy link

Fixes armory3d/armory#2292.

If the scene was changed and the lights of the previous scene were removed, the renderpath point, sun and light variables were not correctly updated if necessary, which led to passing the old light's values to the shaders in the new scene. Also, null was passed to uniforms if the value wasn't set, which led to platform-dependent behaviour and to the above issue.

Now, false is returned by the function that sets the uniforms if a uniform is unknown (just as before), but otherwise there is a default value set (0 for scalars and vectors and the identity matrix for matrices) and true is returned.

@luboslenco luboslenco merged commit 3e4467c into armory3d:master Sep 27, 2021
@MoritzBrueckner MoritzBrueckner deleted the fix-lights-scene-switch branch September 27, 2021 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

Lamps from Scene A are also on Scene B
2 participants