Question: Add shadow mapping to your code from Exercise 10.3 so that your height-mapped terrain casts shadows. Exercise 10.3 // variables and structs as in previous

Add shadow mapping to your code from Exercise 10.3 so that your height-mapped terrain casts shadows.

Exercise 10.3// variables and structs as in previous fragment shader, plus: // normal map // texture layout (binding=0)void main(void) { // computations same as before, until: vec3 N = calcNewNormal(); vec4 texel =

// variables and structs as in previous fragment shader, plus: // normal map // texture layout (binding=0) uniform sampler2D s0; layout (binding-1) uniform sampler2D s1;

Step by Step Solution

3.31 Rating (157 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To add shadow mapping to the code provided in Exercise 103 we need to incorporate shadow mapping tec... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Computer Graphics Programming Questions!