jdolan / quetoo

Quetoo ("Q2") is a free first person shooter based on id Tech2. GPL v2 license.
http://quetoo.org
204 stars 28 forks source link

Sprites should support lighting via the lightgrid and dynamic light sources #596

Closed jdolan closed 3 years ago

jdolan commented 3 years ago

Sprites such as smoke would really benefit from receiving lighting. The lightgrid can be used for vertex-based static lighting. The dynamic light sources can be used for dynamic lighting. The amount of light a sprite should accept can be controlled via a user-defined scalar on each sprite instance which is passed into the vertex shader as a vertex attribute. This will allow for emissive sprites to remain quite bright, while non-emissive sprites receive the lighting of the scene around them.

jdolan commented 3 years ago

This is addressed by:

e3f0eb2bbbdbd8ea660eae37c0f3a8d8a56cadd6 36f0d1e2b4796dd892e07d505024928dd6e1ecc7

Looks boss!