View Full Version : GLSL shaders for images
04-26-2011, 06:45 PM
Using a lib i loaded a bmp image as a texture and i rendered it in opengl. Is it possible to apply shaders on the texture to give a tooning effect?
05-02-2011, 03:38 AM
If you mean toon-shading (cel-shading) ... i believe this is normally applied to 3d-models rather than images.
However, if you know an image filter that does what you need you can most likely implement it as a shader somehow.
05-02-2011, 04:28 AM
try decimating the color.
if the frag shader is currently "gl_FragColor=color;"
float scale = 8.0;
color = floor(color*scale);
gl_FragColor = color;
05-03-2011, 02:25 PM
Sobel filter which is also known as edge detection algorithm for 2d images.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.