diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-20 15:28:49 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-10-20 15:28:49 (GMT) |
| commit | 09d3cacf9cb3ee0098df6d0ea34dc39b608f6931 (patch) | |
| tree | 94cdd0c431f87d763826da6db167dc02ef04dd48 /includes/graphics.h | |
| parent | 2b56d31610c1c9be6c09e539cf8e344bc8becbc9 (diff) | |
| download | powder-09d3cacf9cb3ee0098df6d0ea34dc39b608f6931.zip powder-09d3cacf9cb3ee0098df6d0ea34dc39b608f6931.tar.gz | |
Implement Blur mode and embed shaders
Diffstat (limited to 'includes/graphics.h')
| -rw-r--r-- | includes/graphics.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/graphics.h b/includes/graphics.h index 35fb4dc..a570396 100644 --- a/includes/graphics.h +++ b/includes/graphics.h @@ -191,3 +191,16 @@ void ogl_blit(int x, int y, int w, int h, pixel *src, int pitch, int scale); #endif #endif + +#ifdef INCLUDE_SHADERS +const char * fragment = "uniform sampler2D fireAlpha;\ +void main () {\ + vec4 texColor = texture2D(fireAlpha, gl_PointCoord);\ + gl_FragColor = vec4(gl_Color.rgb, texColor.a*gl_Color.a);\ +}"; +const char * vertex = "void main(void)\ +{\ + gl_Position = ftransform();;\ + gl_FrontColor = gl_Color;\ +}"; +#endif |
