Batching - fix custom MODULATE shader applying modulate twice
One of the new fvf types (FVF_MODULATED) allows batching custom shaders that use modulate. The only slight oversight is that there is a special define when MODULATE is used in a custom shader, called MODULATE_USED, that is checked, and if set it does NOT apply final_modulate as part of canvas.glsl. This MODULATE_USED define wasn't checked when the new FVF was used and modulate was passed in an attribute. This PR moves the application of the final_modulate into the #ifndef MODULATE_USED section.
This commit is contained in:
parent
60f1219897
commit
c401960634
@ -480,10 +480,10 @@ FRAGMENT_SHADER_CODE
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !defined(MODULATE_USED)
|
||||
#ifdef USE_ATTRIB_MODULATE
|
||||
color *= modulate_interp;
|
||||
#else
|
||||
#if !defined(MODULATE_USED)
|
||||
color *= final_modulate;
|
||||
#endif
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user