Question: Modify Program 13.4 so that it produces outward-facing line segments with more than two vertices, arranged so as to make the line segments appear to

Modify Program 13.4 so that it produces outward-facing line segments with more than two vertices, arranged so as to make the line segments appear to bend slightly.

Program 13.4 layout (line_strip, max_vertices=2) out; void main(void) {vec3 op0 = gl_in[0].gl_Position.xyz; // originalvec3 op1 = gl_in[1].gl_Position.xyz; vec3 op2 = gl_in[2].gl_Position.xyz; vec3 ep0 = gl_in[0].gl_Position.xyz

layout (line_strip, max_vertices=2) out; void main(void) {vec3 op0 = gl_in[0].gl_Position.xyz; // original triangle vertices

Step by Step Solution

3.48 Rating (155 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!