Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's vertex shading?

I am a beginner in polygon based computer graphics. Whatever I read I always come across the term vertex shading.

What is it? As far as I know vertices are the points where two edges of the polygon meet. So how do you shade a vertex (its just a point)?

Please explain

like image 690
Allahjane Avatar asked Sep 01 '25 11:09

Allahjane


1 Answers

Good question; the term "vertex shader" is indeed a misnomer. The term "shader" is used for any program that typically runs on the GPU (as opposed to the CPU). The first incarnation of these were pixel shaders, also known as fragment shaders, where the name still made sense.

Then vertex shaders were invented, but they don't actually shade anything; they have the ability to transform a vertex's position in space, and they can pass down per-vertex data to the pixel shader. "Vertex program" would be a better name, but the word "shader" apparently stuck.

like image 98
Thomas Avatar answered Sep 03 '25 02:09

Thomas