3D Graphics Run with WebGL! Read the E-Book

WebGL Scenes: Responsive Web Design

Cube with Directional Light

Applies a Normal Map

Swipe to Rotate the Cube

Swipe to rotate the cube which displays highlight and shadow based on directional light and a normal map. The cube rotates into the distance and back again. Faces of the cube light up when near the viewport and darken when far from the viewport. The vertex shader declares a constant which indicates light direction.

WebGL Lighting E-Book Screen Shots
Copyright © 2015 Seven Thunder Software. All Rights Reserved.