Lighting

API

API originally meaning Advanced Programming Interface, is now more commonly known as Application Programming Interface. An API is a source code interface that an operating system or library provides to support requests for services to be ade of it by computer programs, in other words, it serves as a way for two programs to interact with each other.

OpenGL Lighting

The three forms of lighting offered by OpenGL are per polygon, per vertex and per pixel lighting. Vertex lighting determines how many polygons are touching a vertex and takes

Vertex, normal and polygon

Vertex Lighting

The advantage of vertex lighting is that hardware can help do this faster using hardware transform and lighting.The disadvantages, on the other hand, are that it does not produce shadowing.

Shaders

Phong components version 4.png

A shader is a set of software instructions used to perform rendering effects. If i wanted to illustrate the shininess of an object i would use a Phong shader in my scene.

Leave a Reply