Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: data/branches/Shader_HS18/programs/GLSL150/GrassFp.glsl @ 12292

Last change on this file since 12292 was 12115, checked in by wiesep, 6 years ago

Changed folder structure, deletet some unused files and cleaned up code

File size: 475 bytes
Line 
1#version 150
2
3////////////////////////////// MOVING GRASS
4// Vertex program to wave some grass about
5// Assumes UV texture coords of v==0 indicates the top of the grass
6uniform sampler2D diffuseMap;
7
8in vec4 oUv0;
9in vec4 oColour;
10
11out vec4 fragColour;
12
13void main()
14{       
15    vec4 texColor = texture(diffuseMap, oUv0.xy);
16    fragColour = vec4(texColor.rgb * oColour.rgb, texColor.a); 
17
18    // Do manual alpha rejection
19    if (texColor.a < 0.58)
20    {
21        discard;
22    }
23}
Note: See TracBrowser for help on using the repository browser.