Question: Using a paint program, generate your own height map and use it in Program 10.4. See if you can identify locations where detail is missing

Using a paint program, generate your own height map and use it in Program 10.4. See if you can identify locations where detail is missing as the result of the vertex shader being unable to adequately sample the height map. You will probably find it useful to also texture the terrain with your height map image file as shown in Figure 10.14 (or with some sort of pattern that exposes the surface structure, such as a grid), so that you can see the hills and valleys of the resulting terrain.

Program 10.4#version 430 layout (location=0) in vec3 vertPos; layout (location=1) in vec2 texCoord; layout (location=2)layout (binding=0) uniform sampler2D t; layout (binding=1) uniform sampler2D h; // for texture // for

Figure 10.14#version 430 layout (location=0) in vec3 vertPos; layout (location=1) in vec2 texCoord;

#version 430 layout (location=0) in vec3 vertPos; layout (location=1) in vec2 texCoord; layout (location=2) in vec3 vertNormal; out vec2 tc; uniform mat4 mv_matrix; uniform mat4 p_matrix;

Step by Step Solution

3.39 Rating (158 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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!