Initial commit

This commit is contained in:
Stillkill committed 2026-03-08 15:34:38 -05:00
commit 86efc669e9
5013 files changed
+237743

No files matched your search

@@ -0,0 +1,46 @@
// __multiversion__
// This signals the loading code to prepend either #version 100 or #version 300 es as apropriate.
#include "shaders/fragmentVersionCentroid.h"
uniform sampler2D TEXTURE_0;
#if __VERSION__ >= 300
_centroid varying vec4 uv;
#else
varying vec4 uv;
#endif
#ifdef ENABLE_FOG
varying vec4 fogColor;
#endif
#ifdef ENABLE_LIGHT
varying vec4 light;
#endif
#ifndef DISABLE_TINTING
varying vec4 color;
#endif
void main()
{
vec4 diffuse = texture2D(TEXTURE_0, uv.xy);
vec4 base = texture2D(TEXTURE_0, uv.zw);
#ifndef DISABLE_TINTING
base.a = mix(diffuse.r * diffuse.a, diffuse.a, color.a);
base.rgb *= color.rgb;
#endif
#ifdef ENABLE_LIGHT
base.rgb *= light.rgb;
#endif
#ifdef ENABLE_FOG
//apply fog
base.rgb = mix( base.rgb, fogColor.rgb, fogColor.a );
#endif
gl_FragColor = base;
}