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)
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; // original](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1701/6/7/7/428656d89747ad641701677428094.jpg)
![vec3 op1 = gl_in[1].gl_Position.xyz; vec3 op2 = gl_in[2].gl_Position.xyz; vec3 ep0 = gl_in[0].gl_Position.xyz](https://dsd5zvtm8ll6.cloudfront.net/images/question_images/1701/6/7/7/442656d8982844231701677441744.jpg)
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.42 Rating (152 Votes )
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
