Hot answers tagged post-processing
17
I can't tell if that specific image you linked was painted that way originally or not, but the resulting effect looks similar to an edge detection filter.
Edge detection post-processing is often done using a Sobel filter implementation. For example, as seen here (a CPU-side implementation). The effect can be achieved in shaders as well (here is an HLSL ...
7
To complete what Josh said, Convolution Matrix is what you want:
Convolution in Gimp
Another link
What you probably are looking for:
Convolution Kernels in OpenGL
7
It's a combination of full-screen effects.
There are a few ways to render full-screen shader effects, the most common is to first render the scene (without effects) to texture. Then that texture and the effect shader is set and a fullscreen quad is rendered.
The blurring in the corners could be done with a refraction effect. A refraction texture controls ...
2
Cel shading must be done at the pixel shader level to look proper, same as most other lighting. If you do it in the vertex shader, the cel shading edges will be along triangle edges rather than smoothed across the model's shape.
Many existing games can likely be easily modded to use cel shading techniques, as you need to only replace some shaders and ...
1
You need at least two passes for deferred shading, the first to fill the G-Buffer and the second for the lights. After that you need at least another pass for effects, you would probably render the light result to another framebuffer and then render the effects on this framebuffer. You can use this third pass for all the effects, if you write a single shader ...
1
If you dont mind having little bit more expensive shader (but it has same number of texture fetches as sobel filter), you can implement frei-chen edge detector.
It provides smoother image than sobel filter.
Great article with example implementation:
http://rastergrid.com/blog/2011/01/frei-chen-edge-detector/
1
You are using the old, deprecated immediate mode for drawing your polygons (glBegin/glVertex/glEnd calls). This causes a huge performance impact because you fill up the draw call budget pretty quickly, and multiple synchronous flush commands must be sent to the GPU to draw the triangles.
Just use vertex buffer objects for drawing your models and you will ...
1
The question is a bit ambiguous. Will it work? Sure it will. You can probably squeeze it down to one pass that traces against all lights, even though you use one pass per light. Can you add your lights to a list and do a post process batch where your lights are in a list?
Will it look good? That's the problem. It's not really easy to answer and depend a lot ...
Only top voted, non community-wiki answers of a minimum length are eligible
