Skip to content
Snippets Groups Projects
Commit f23b38f3 authored by dg's avatar dg
Browse files

shading shaders

git-svn-id: http://svn.net-core.org/repos/t-engine4@4897 51575b47-30f0-44d4-a5cc-537603b46e54
parent fdd1c9f6
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,7 @@ uniform sampler2D noisevol;
uniform vec2 texSize;
uniform sampler2D tex;
uniform vec4 colorize;
uniform vec4 intensify;
void main(void)
{
......@@ -99,6 +100,13 @@ void main(void)
gl_FragColor = gl_FragColor * (1.0 - colorize.a) + (vec4(colorize.r, colorize.g, colorize.b, 1.0) * grey);
}
if (intensify.r > 0.0 || intensify.g > 0.0 || intensify.b > 0.0)
{
float grey = gl_FragColor.r*0.3+gl_FragColor.g*0.59+gl_FragColor.b*0.11;
vec4 vgrey = vec4(grey, grey, grey, gl_FragColor.a);
gl_FragColor = max(gl_FragColor * intensify, vgrey);
}
if (hp_warning > 0.0)
{
vec4 hp_warning_color = vec4(hp_warning / 1.9, 0.0, 0.0, hp_warning / 1.5);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment