View Full Version : GLSL shaders for images
04-26-2011, 07: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, 04: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, 05: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, 03:25 PM
Sobel filter which is also known as edge detection algorithm for 2d images.
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.