Roblox / future-is-bright

Prototyping future Roblox lighting technology
https://roblox.github.io/future-is-bright/
60 stars 12 forks source link

ParticleEmitter has weird pixel wave (LightEmission) #70

Closed Sparkypen7 closed 5 years ago

Sparkypen7 commented 7 years ago

https://i.gyazo.com/7f30a074ebac8e2421c89376c5ccda0b.mp4

Not sure how to describe it.

Also, this is on ShadowMap, VoxelCPU, and VoxelGPUCascaded. The LightEmission of the particle is 5, setting it 0 will make this bug go away.

plasma-node commented 7 years ago

This has to do with the light emission of the particles, I thought Zeuxcg fixed it in the latest version but I guess not.

skedgywasedgy commented 6 years ago

Well,I think I see the problem. LightEmission is meant to be a number between 0 and 1. It uses addition, so if you were to set it to 5 and the particle was just a pure red square (1, 0, 0), and it was against a cyan sky (0, 1, 1), the result would be 1 5 + 0, 0 5 + 1, 0 * 5 + 1, or 5, 0, 0. ROBLOX tends to react to Color3 values over 1 by subtracting from all 3 values until all of them are below 1, resulting in that demon you just saw there.

zeux commented 5 years ago

I don't think this should happen anymore since we are using a different HDR representation. And yeah LightEmission is supposed to be between 0 and 1...