Check it out there: GLSL programs for FBO effects
For example, here is a replacement for glslRotoscopeZ GLSL program:
- Code: Select all
uniform vec2 texelSize;
uniform sampler2D srcSampler;
uniform sampler2D depthSampler;
void main()
{
float fragsobel = sobel(depthSampler, gl_TexCoord[0].xy, texelSize);
vec4 final_color = texture(srcSampler, gl_TexCoord[0].xy);
fragsobel = clamp(fragsobel, 0.0, 1.0);
gl_FragColor = final_color * (1.0 - fragsobel);
}
It only removes the toon color call but keep the edge detection... so edges are drawn in black like in that screenshot:
[thumb=http://forum.smokin-guns.org/userpix/1560_shot0032_1.jpg][timg]1560_shot0032_1.jpg[/timg][/thumb]