March 2013
Intermediate to advanced
984 pages
26h 18m
English
With increased freedom comes increased responsibility. The OpenGL Shading Language permits the computation of procedural textures without restriction. It is quite easy to write a shader that exhibits unsightly aliasing artifacts (using a conditional or a step function is all it takes), and it can be difficult to eliminate these artifacts. After describing the aliasing problem in general terms, this chapter explored several options for antialiasing procedural textures. Facilities in the language, such as the built-in functions for smooth interpolation (smoothstep()), for determining derivatives in screen space (dFdx(), dFdy()), and for estimating filter width (fwidth()) can assist in the fight against jaggies, moiré ...