Make image with Shadertoy

A question about “Make image with Shadertoy” … which may reveal my lack of knowledge on the subject.
Is the shader applied once to each pixel in the output image width and height, or (as I would expect) multisampling is being used?
If the later, then how does one adjust the degree of multisampling?


The shader is applied once to each pixel in the output image with no multisampling. Make Image with Shadertoy draws a pair of triangles that completely cover the image, with no visible triangle edges. OpenGL multisampling only makes a difference for edges of triangles. Since they aren’t visible, OpenGL multisampling wouldn’t have any effect for this node, so Vuo disables it to improve performance.

I’ll take your word for it.
I woud have thought that a single pixel sampling woutl lead to aliasing effects.  

Paul, my apologies in the delay getting back to you.

It’s true that sampling discrete pixels can lead to aliasing. Some ways to compensate for that:

  1. Modify the shader to take into account the space between the discrete sample points. The GLSL smoothstep() and fwidth() functions are useful for that — here’s an introductory tutorial:

  2. Spatially supersample — render the shader image at a higher resolution than needed, then scale it down.

  3. Render the shader image as usual, then apply an alias-reducing postprocessing filter such as FXAA