Book Image

WebGL HOTSHOT

By : Mitch Williams
Book Image

WebGL HOTSHOT

By: Mitch Williams

Overview of this book

Table of Contents (17 chapters)
WebGL HOTSHOT
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Mission accomplished


This project followed the old Hollywood saying "lights, camera, action." We deployed the most complex lighting in spot and point lights. Point lights are similar to lightbulbs; they shine in all directions, whereas spotlights have a direction with a beam-width radius of high intensity and a wider cut-off angle radius where the light fades out. Other lighting parameters include attenuation, where the light fades out over distance.

Night scenes deploy a black fog, also known as depth cueing, where objects that are more distant appear darker and thus give users a visual cue of depth. Dark scenes have intriguing designs because they focus our attention on key scene objects in the foreground. Fog is useful too because distant objects blend into the background rather than just disappearing past the far-clipping plane that cuts off the rendering of objects.

We also rendered partially transparent objects. The order of drawing partially transparent overlapping objects must be stacked...