Question: Modify Program 14.4 (the version including the modification in Figure 14.10 that produces a 3D cubed texture) so that it instead textures the Studio 522

Modify Program 14.4 (the version including the modification in Figure 14.10 that produces a 3D cubed texture) so that it instead textures the Studio 522 dolphin. Then observe the results. Many people when first observing the result—such as that shown on the dragon, but also even on simpler objects—believe that there is some error in the program. Unexpected surface patterns can result from “carving” an object out of 3D textures, even in simple cases.

Program 14.4Java/JOGL application: private int texWidth = 256; private int texHeight= 256; private int texDepth = 256;// fill a byte array with RGB blue/yellow values corresponding to the pattern built by generate3Dpattern()// build 3D pattern of stripes void generate3Dpattern() { for (int x=0; xgl.glBind Texture(GL_TEXTURE_3D, texturelD); gl.gl TexStorage3D(GL_TEXTURE_3D, gl.gltexWidth, texHeight, texDepth, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, bb); gl.gl TexParameteri(GL_TEXTURE_3D,layout (binding=0) uniform sampler3D s; void main(void) { original Position = position; //pass original model

Figure 14.10void generate3Dpattern() { int xStep, yStep, zStep, sumSteps; for (int x=0; x

Java/JOGL application: private int texWidth = 256; private int texHeight= 256; private int texDepth = 256; private double[][][] tex3Dpattern = new double[texWidth][texHeight][texDepth];

Step by Step Solution

3.38 Rating (157 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!