Question: For every ( s , t ) produced by the two nested for - loops, we need to call this: void ProduceVertex ( float s
For every st produced by the two nested forloops, we need to call this:
void
ProduceVertex float s float t
vec v do the vertex st interpolation
v make vs cordinates be with respect to the CG
v v roughly same code as morphing the cow into a sphere of radius uDiam
v put v back in the global space ie undo the second line of code
vec ECposition glModelViewMatrix vecv;
vec n on a sphere, the normal is a vector from the vertex v to the sphere center CG
n multiply the new normal by the proper matrix and normalize it
will be needed by the fragment shader to perform perfragment lighting:
gN
gL
gE
finally multiply the vertex by the combined matrices:
glPosition vec;
EmitVertex;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
