assets/pc/nzp/shaders/splat.glsl

40 lines
590 B
Text
Raw Normal View History

2022-02-08 18:58:09 +00:00
!!permu FRAMEBLEND
!!permu SKELETAL
!!permu FOG
varying vec2 tc;
//varying float va;
#ifdef VERTEX_SHADER
#include "sys/skeletal.h"
attribute vec2 v_texcoord;
//attribute vec4 v_colour;
uniform vec3 e_eyepos;
void main ()
{
vec3 n;
gl_Position = skeletaltransform_n(n);
tc = v_texcoord;
//va = v_colour.a;
}
#endif
#ifdef FRAGMENT_SHADER
#include "sys/fog.h"
uniform sampler2D s_t0;
uniform vec4 e_colourident;
void main ()
{
vec4 col;
col = texture2D(s_t0, tc);
col.a -= 1 - e_colourident.a;
if(col.a > 0.1)
col.a = 1;
else
col.a = 0;
gl_FragColor = fog4(col);
}
#endif