Fragment Shader Point Light

Face Mapped Cube

Swipe to rotate the cube.

Your browser doesn't support WebGL.

Swipe to rotate the texture mapped cube. GLSL shader lighting helps define the shape of the cube. Each face of the cube is mapped edge to edge with a photograph of the desert. The fragment shader declares constants with light location, light color, and ambient color.

JavaScript uploads an attribute with normal coordinates per vertex. For each rendered frame upload a normal matrix. The normal matrix is a 3 x 3 matrix derived from the inverted and transposed model matrix. The vertex shader applies normal attributes with the normal matrix to compute lighting per frame. Read the point light tutorial for details.

3D Models

If a picture's worth a thousand words, then a 3D model's worth ten thousand words! Consider 3D interactive content for learning, media, and marketing. Seven Thunder Software develops 3D models for Web design, with optimized (fast loading) 3D rendering software, from photographs, blue prints, ideas, and real objects.

Tags

Interactive media, 3D shapes, 3D models, 3D, online 3D modeling,3D viewer, Web GL, 3D Programming, 3D Development, 3D Media, 3D Web, GLSL, 3D Web Design, 3D Web Development, Web development, WebGL, WebGL example, WebGL online, WebGL example online, create 3D website, 3D Media, 3D animation, graphic design, Website design,
Learn 3D Programming Learn 3D Programming
Copyright © 2015 Seven Thunder Software. All Rights Reserved.