DonkeyKong64 grind crash
[carveJwlIkooP6JGAAIwe30JlM.git] / shaders / scene_standard_alphatest.fs
1 uniform sampler2D uTexGarbage;
2 uniform sampler2D uTexMain;
3 uniform vec3 uCamera;
4 uniform vec4 uPlane;
5
6 #include "common_scene.glsl"
7 #include "motion_vectors_fs.glsl"
8
9 void main()
10 {
11 compute_motion_vectors();
12
13 vec3 vfrag = vec3(0.5,0.5,0.5);
14 vec4 vsamplemain = texture( uTexMain, aUv );
15 vec3 qnorm = aNorm.xyz;
16
17 if( vsamplemain.a < 0.15 )
18 discard;
19
20 vfrag = vsamplemain.rgb;
21
22 if( g_light_preview == 1 )
23 {
24 vfrag = vec3(0.5);
25 }
26
27 vfrag = scene_compute_lighting( vfrag, qnorm, aWorldCo );
28 oColour = vec4(vfrag, 1.0);
29 }