torsdag 4 maj 2017

Geometry Shader

Today we implemented a geometry shader. In the future, this is probably where the bulk of our fur shader will be contained. For now, we experimented with some very simple geometry shaders: one which draws the normal vectors of each vertex, and one which creates a nacho shield.

In these models we have connected two shader programs to the same model (the piglet). We first render our piglet with the normal shader which we haven't changed from the previous blog posts. We then render it again with the program that includes a geometry shader. In the second image, the geometry shader takes each triangle and moves it out a certain distance in the direction of the normal vector. 

Inga kommentarer:

Skicka en kommentar