⚠ Cookies ⚠

By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.

Projects

AGS EngineGraphicsChange tinting to multiplicative blending.
Calin LeafshadeCurrently the tinting algorithm uses 5 values (r,g,b,saturation and luminance). This is unnecessary, slow and unintuitive.
The saturation and luminance of the tint colour should be contained within the RGB values and it makes no sense to have these extra values affect the RGB color given.
On top of that the saturation value affects the degree of the effect of the luminance value so it's impossible to partially apply the color and fully apply the luminance value (for normal darkness).

Simple multiplicative blending is faster and solves all these issues.

It's as simple as multiplying the source color by the tint color:

[code=glsl]
    vec4 col = Texture2D(source, texture_coords) * tintCol;
[/code]

[code=c]
  r = r * tintR;
  g = g * tintG;
  b = b * tintB;
[/code]
© Adventure Game Studio 2024. Page design by loominous and Darth Mandarb; coding by AGA.
Page generated on 06 May 2024 at 18:57:11