1 /**
2 * Post-Processing pass shader to render User Interfaces
3 */
4 module dash.graphics.shaders.glsl.userinterface;
5 import dash.graphics.shaders.glsl;
6 
7 package:
8 
9 ///
10 /// User interface shader
11 /// Just for transferring a texture (from awesomium) to the screen
12 ///
13 immutable string userinterfaceVS = glslVersion ~ q{
14     in vec3 vPosition;
15     in vec2 vUV;
16 
17     out vec2 fUV;
18 
19     uniform mat4 worldProj;
20 
21     void main( void )
22     {
23         gl_Position = worldProj * vec4( vPosition, 1.0f );
24 
25         fUV = vUV;
26     }
27     
28 };
29 
30 /// Put the texture on the screen.
31 immutable string userinterfaceFS = glslVersion ~ q{
32     in vec2 fUV;
33 
34     out vec4 color;
35 
36     uniform sampler2D uiTexture;
37 
38     void main( void )
39     {
40         color = texture( uiTexture, fUV );
41     }
42     
43 
44 };