Specular Light: Per Vertex

Vertex Shader Processes Lighting

Swipe to Spin the Shaded Cube

View this simplified example of a specular light on a cube. The vertex shader calculates lighting. The cube is mapped with a solid color blue. Lighting helps define the shape of the cube. Light location, light color, and ambient color are all declared with constants in the vertex shader, to keep this example simple.

Compare to specular light in the fragment shader. Read the Specular Light Tutorial: Vertex Shader Processing for details.

Seven Thunder Software created a cube in 3ds Max then exported as a DAE file with normals. JavaScript for this example uploads an attribute with normal coordinates per vertex. Each animation frame uploads a normal matrix. The normal matrix is a 3 x 3 matrix derived from the inverted and transposed model matrix.

As the cube rotates and moves, both a model matrix and a normal matrix are uploaded. The vertex shader uses the normal attributes and normal matrix to compute lighting per frame.

3D Web Design

Educate, inspire and inform with interactive 3D Media online. Interactive media in the form of 3D shapes or 3D models, provide unique opportunities to express concepts, such as educational course work or new product features. Seven Thunder Software's simple 3D viewer enables users to see three dimensional objects interactively. Swipe to rotate a model. Tap to select elements on the model. Options allow users to select and learn about individual features. Email Seven Thunder Software for online 3D modeling.

3D Web Development

Your message can reach the widest audience with 3D Web design. Most 3D programming's implemented with common Web technologies including WebGL, JavaScript, CSS, GLSL and HTML5. Examples were tested with iPhone, Android, Windows PCs and Windows phone.

3D Models Online

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

Tags
graphic design, Website design, Web design,Interactive media, online 3D modeling, create 3D website, Web GL, 3D Development, 3D Web, 3D Web Design, WebGL example, WebGL online, WebGL example online,
Learn 3D Programming Learn 3D Programming
Copyright © 2015 Seven Thunder Software. All Rights Reserved.