-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - Spherical Area Lights #1901
Conversation
Okay, it stopped working after merging in the PointLight changes from another branch. Need to figure out what I messed up. |
Does it make sense to put it into something else than |
Yes it makes sense for Point Lights as well as, eventually, Spot Lights. To the best of my knowledge, that's how Unreal Engine does it. Those light types just describe the cutoff behavior for the area lights, such as the range and/or the cone. |
So in my cubism-demo-rs project I removed the code that used my new Spherical Area Lights and tested it with both bevy 0.5.0 and the latest directly from bevy's github main branch. Here's what I observed: As you can see the latest appears broken even without my Spherical Area Light code. There appears to have been a lighting related PR that broke it within the last 24 hours. I believe this one is the culprit: Does anyone have any thoughts on how I should proceed? |
I've applied the uniforms packing fix to my code and moved the radius value into that new vector rather than hijacking the color alpha channel. The PR should now be ready to go. |
bors r+ |
I still need to simplify and optimize the code, but here's a preliminary working version of Spherical Area Lights. See the example image below from a modified version of my [cubism-demo-rs](https://github.com/Josh015/cubism-demo-rs) app, which you can also clone and run to see them in action. ![Spherical Area Lights v1](https://user-images.githubusercontent.com/8846132/114491862-60df6000-9be5-11eb-8950-f039b74e1e96.jpg)
Pull request successfully merged into main. Build succeeded: |
I still need to simplify and optimize the code, but here's a preliminary working version of Spherical Area Lights. See the example image below from a modified version of my [cubism-demo-rs](https://github.com/Josh015/cubism-demo-rs) app, which you can also clone and run to see them in action. ![Spherical Area Lights v1](https://user-images.githubusercontent.com/8846132/114491862-60df6000-9be5-11eb-8950-f039b74e1e96.jpg)
I still need to simplify and optimize the code, but here's a preliminary working version of Spherical Area Lights. See the example image below from a modified version of my cubism-demo-rs app, which you can also clone and run to see them in action.