1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-23 15:16:17 +00:00
Files
godot/drivers/gles2/rasterizer_canvas_gles2.cpp
lawnjelly b08ad9ef64 GLES2 batching - prevent color baking with MODULATE or COLOR
Adding the ability to access MODULATE in the shader breaks when final_modulate is baked into vertex colors (this is a technique used to batch together different colored items). This PR prevents baking vertex colors when MODULATE is detected in the shader.

It also prevents baking when COLOR is read in canvas shaders, which could currently produce the wrong result in the shader if colors were baked. It does not prevent baking if COLOR is only written, which happens in most shaders, and will operate correctly without baking.
2020-05-04 11:19:55 +01:00

126 KiB