Question: Write a complete WebGL program (javascript code, vertex and fragment shaders) that draw a random triangle in the canvas with a painted inside. The
Write a complete WebGL program (javascript code, vertex and fragment shaders) that draw a random triangle in the canvas with a painted inside. The vertex coordinates will be generated randomly when the program starts (within the limits of the canvas, of course). Also, when the user clicks on the canvas with the mouse, the color of the triangle should change.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
