multisample

Return the average of S×S samples of shader function FN at position pos. FN must return the color as vec4. shadron_PixelSize is used to compute the sampling range.

template <FN, S>
vec4 multisample(vec2 pos);

Return the average of S×S spatial samples and TS temporal samples of animated shader function FN at position pos. FN must return the color as vec4. shadron_PixelSize and shadron_DeltaTime is used to compute the sampling range.

template <FN, S>
vec4 multisampleAnimation(vec2 pos, float time);

Return the average of S×S samples of shader function FN at cubemap direction dir. FN must return the color as vec4.

template <FN, S>
vec4 multisampleCubemap(vec3 dir);

Example

image ImageMS = glsl(multisample<imageShader, 4>, dimensions);
animation AnimationMS = glsl(multisampleAnimation<animShader, 4, 4>, dimensions);
cubemap CubemapMS = glsl(multisampleCubemap<cubemapShader, 4>, side);