logo

Crowdly

The following shows an excerpt of the code for a vertex lighting shader. What do...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

The following shows an excerpt of the code for a vertex lighting shader. What does the code with red colour calculate?

vec3 pos = -(uModelViewMatrix * aPosition).xyz;

vec3 light = uLightPosition.xyz;

vec3 L = normalize( light - pos ); 

vec3 E = normalize( -pos );      

vec3 H = normalize( L + E ); 

More questions like this

Want instant access to all verified answers on learn.twu.ca?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!