Update auto_toon.glsl

This commit is contained in:
myownfriend 2014-05-20 23:40:18 -04:00
parent a26673163f
commit 8b0d4db1ac
1 changed files with 11 additions and 11 deletions

View File

@ -7,16 +7,16 @@ uniform vec4 resolution;
void main()
{
vec4 to_gray = vec4(0.3,0.59,0.11,0);
float x1 = dot(to_gray, texture(samp9, uv0+vec2(1,1)*resolution.zw));
float x0 = dot(to_gray, texture(samp9, uv0+vec2(-1,-1)*resolution.zw));
float x3 = dot(to_gray, texture(samp9, uv0+vec2(1,-1)*resolution.zw));
float x2 = dot(to_gray, texture(samp9, uv0+vec2(-1,1)*resolution.zw));
float edge = (x1 - x0) * (x1 - x0) + (x3 - x2) * (x3 - x2);
float4 color = texture(samp9, uv0).rgba;
vec4 to_gray = vec4(0.3,0.59,0.11,0);
ocol0 = color - vec4(edge, edge, edge, edge) * 12.0;
float x1 = dot(to_gray, texture(samp9, uv0+vec2(1,1)*resolution.zw));
float x0 = dot(to_gray, texture(samp9, uv0+vec2(-1,-1)*resolution.zw));
float x3 = dot(to_gray, texture(samp9, uv0+vec2(1,-1)*resolution.zw));
float x2 = dot(to_gray, texture(samp9, uv0+vec2(-1,1)*resolution.zw));
float edge = (x1 - x0) * (x1 - x0) + (x3 - x2) * (x3 - x2);
float4 color = texture(samp9, uv0).rgba;
ocol0 = color - vec4(edge, edge, edge, edge) * 12.0;
}