Skip to Main Content
WebGL Insights
book

WebGL Insights

by Patrick Cozzi
August 2015
Intermediate to advanced content levelIntermediate to advanced
416 pages
16h 58m
English
A K Peters/CRC Press
Content preview from WebGL Insights
20312.3 Shader Generation
12.3.3 Shader Graph Traversal and Compilation
A shader graph is a directed acyclic graph and has a straightforward internal compilation
mechanism. As the path is traversed, each node’s output is followed. e output from the
previous node becomes the input for the next node in the graph. For a shader node to be
taken into account during compilation, it must ultimately traverse to gl_FragColor
(seeFigure12.8). During each traversal, dierent fragment shader parts are gathered.
e nal node output is the fragment shader gl_FragColor, and the nal traversal
produces the main() function. is ensures that m ain() always ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

Learning HTML5 Game Programming: Build Online Games with Canvas, SVG, and WebGL

James L. Williams

Publisher Resources

ISBN: 9781498716079