5ed0fd067d
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. |
||
---|---|---|
.. | ||
blend_shape.glsl | ||
canvas.glsl | ||
canvas_shadow.glsl | ||
copy.glsl | ||
cube_to_dp.glsl | ||
cubemap_filter.glsl | ||
effect_blur.glsl | ||
exposure.glsl | ||
lens_distorted.glsl | ||
particles.glsl | ||
resolve.glsl | ||
scene.glsl | ||
screen_space_reflection.glsl | ||
SCsub | ||
ssao.glsl | ||
ssao_blur.glsl | ||
ssao_minify.glsl | ||
subsurf_scattering.glsl | ||
tonemap.glsl |