Modify Program 13.4 to additionally render the original torus. That is, render both a lighted torus and

Question:

Modify Program 13.4 to additionally render the original torus. That is, render both a lighted torus and the outgoing line segments (using a geometry shader) so that the “hair” looks like it is coming out of the torus.

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

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Computer Graphics Programming In OpenGL With JAVA

ISBN: 9781683922193

2nd Edition

Authors: V. Scott Gordon PhD, John L. Clevenger PhD

Question Posted: