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
27117.6 WebGL Implementation
17.6.6 Drawing Slice from the Point of View of Eye
We now detail the drawing function to render slices from the point of view of eye. In this
function, we pass two parameters, the index of the current slice (i) and a Boolean ag
that tells if the view direction vector is inverted. We rst set the appropriate draw buer
(eyebuffer). When the view direction vector is inverted, the Under blending opera-
tor is used, which is (gl.blendFunc(gl.ONE_MINUS_DST_ALPHA, gl.ONE)).
is ensures that the slices are always sorted in front-to-back order whenrendered from
the point of view of eye. is blending operator is used when ...
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