assaultfish/engine/resource/shadow.fs

19 lines
365 B
Forth
Raw Normal View History

2026-01-05 18:40:10 +09:00
#version 110
uniform sampler2DShadow texture;
varying vec4 shadow;
2026-01-05 23:02:30 +09:00
varying vec4 color;
uniform float solid_color;
uniform sampler2D texture_in;
2026-01-05 18:40:10 +09:00
void main (void){
2026-01-05 23:02:30 +09:00
vec4 c;
if(solid_color > 0.5){
c = color;
}else{
c = texture2D(texture_in, gl_TexCoord[1].st);
}
gl_FragColor = (shadow + (gl_Color - shadow) * shadow2DProj(texture, gl_TexCoord[0])) * c;
2026-01-05 18:40:10 +09:00
}