virtualx-engine/drivers/gles2
lawnjelly 5ed0fd067d Batching - use FINAL_MODULATE_ALIAS in shaders
As part of the improvements to batch more cases, batching can store final_modulate as an attribute in the vertex format rather than sending as a uniform. This allows draw calls with different final_modulate to be batched together.

However custom shader code was reading from only the final_modulate uniform, and not the attribute when it was in use. This was leading to visual errors.

This is tricky to solve, because we cannot use the same name for the attribute in the vertex and fragment shaders, because one is an attribute and one a varying, whereas a uniform is accessible anywhere. To get around this, a macro is used which can translate to the most appropriate variable depending on whether uniform or attribute or varying is required.
2021-03-11 17:07:19 +00:00
..
shaders Batching - use FINAL_MODULATE_ALIAS in shaders 2021-03-11 17:07:19 +00:00
rasterizer_canvas_base_gles2.cpp Renaming rendering/2d project settings. 2021-03-01 11:38:46 +00:00
rasterizer_canvas_base_gles2.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
rasterizer_canvas_gles2.cpp Batching - prevent joining of lightmasked items 2021-02-18 09:57:02 +00:00
rasterizer_canvas_gles2.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
rasterizer_gles2.cpp Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
rasterizer_gles2.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00
rasterizer_scene_gles2.cpp Various light culling fixes 2021-03-08 15:10:55 +01:00
rasterizer_scene_gles2.h GLES2 fix for consistent light ordering with BVH 2021-02-24 17:25:28 +00:00
rasterizer_storage_gles2.cpp Fix negative VRAM values 2021-03-09 09:51:17 +00:00
rasterizer_storage_gles2.h Fix negative VRAM values 2021-03-09 09:51:17 +00:00
SCsub SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
shader_compiler_gles2.cpp Batching - use FINAL_MODULATE_ALIAS in shaders 2021-03-11 17:07:19 +00:00
shader_compiler_gles2.h CPU lightmapper fixes. 2021-01-15 12:32:54 +01:00
shader_gles2.cpp [GLES2] Fix binding 3D Transforms to mat4 uniforms 2021-02-03 17:36:21 -06:00
shader_gles2.h Update copyright statements to 2021 2021-01-13 16:17:06 +01:00