.. | .. |
---|
110 | 110 | //private Mat4f spotlightTransform = new Mat4f(); |
---|
111 | 111 | //private Mat4f spotlightInverseTransform = new Mat4f(); |
---|
112 | 112 | static GLContext glcontext = null; |
---|
113 | | - /*static*/ com.sun.opengl.util.texture.Texture cubemap; |
---|
| 113 | + /*static*/ com.sun.opengl.util.texture.Texture cubemap; // Either custom or rgb |
---|
| 114 | + /*static*/ com.sun.opengl.util.texture.Texture cubemapcustom; |
---|
| 115 | + /*static*/ com.sun.opengl.util.texture.Texture cubemaprgb; |
---|
| 116 | + boolean transformMode; |
---|
| 117 | + |
---|
114 | 118 | boolean reverseUP = false; |
---|
115 | 119 | static boolean frozen = false; |
---|
116 | 120 | boolean enablebackspace = false; // patch for back buffer refresh |
---|
.. | .. |
---|
164 | 168 | |
---|
165 | 169 | |
---|
166 | 170 | // OPTIONS |
---|
167 | | - boolean Skinshader = true; |
---|
| 171 | + boolean Skinshader = false; // true; |
---|
168 | 172 | boolean cameraLight = false; |
---|
169 | 173 | boolean UVdebug = false; |
---|
170 | 174 | boolean Udebug = false; |
---|
.. | .. |
---|
173 | 177 | static boolean doublesided = false; // true; // reversed normals are awful for conformance |
---|
174 | 178 | boolean anisotropy = true; |
---|
175 | 179 | boolean softshadow = true; // slower but better false; |
---|
176 | | - boolean opacityhalo = false; |
---|
| 180 | + boolean opacityhalo = false; // reverse the halo effect (e.g. glass) |
---|
177 | 181 | |
---|
178 | 182 | boolean macromode = false; |
---|
179 | 183 | |
---|
.. | .. |
---|
188 | 192 | |
---|
189 | 193 | private File defaultDirectory = javax.swing.filechooser.FileSystemView.getFileSystemView().getDefaultDirectory(); |
---|
190 | 194 | |
---|
191 | | - public void LoadSkybox(String name, String ext, boolean mipmap) throws GLException |
---|
| 195 | + public com.sun.opengl.util.texture.Texture LoadSkybox(String name, String ext, boolean mipmap) throws GLException |
---|
192 | 196 | { |
---|
193 | 197 | try |
---|
194 | 198 | { |
---|
195 | | - cubemap = LoadCubemap(getClass().getClassLoader(), name, ext, mipmap); |
---|
| 199 | + return LoadCubemap(getClass().getClassLoader(), name, ext, mipmap); |
---|
196 | 200 | } catch (IOException e) |
---|
197 | 201 | { |
---|
198 | 202 | System.out.println("NAME = " + name); |
---|
199 | 203 | e.printStackTrace(); // throw new RuntimeException(e); |
---|
| 204 | + return null; |
---|
200 | 205 | } |
---|
201 | 206 | } |
---|
202 | 207 | |
---|
.. | .. |
---|
537 | 542 | LA.vecSub(pv/*.pos*/, rv/*.pos*/, obj.v1); |
---|
538 | 543 | LA.vecCross(obj.v0, obj.v1, obj.v2); |
---|
539 | 544 | LA.vecNormalize(obj.v2); |
---|
540 | | - gl.glNormal3f((float) obj.v2.x, (float) obj.v2.y, (float) obj.v2.z); |
---|
| 545 | + |
---|
| 546 | + SetGLNormal(gl, (float) obj.v2.x, (float) obj.v2.y, (float) obj.v2.z); |
---|
541 | 547 | } |
---|
542 | 548 | |
---|
543 | 549 | // P |
---|
.. | .. |
---|
559 | 565 | y += ny * obj.NORMALPUSH; |
---|
560 | 566 | z += nz * obj.NORMALPUSH; |
---|
561 | 567 | |
---|
562 | | - gl.glNormal3f(nx, ny, nz); |
---|
| 568 | + SetGLNormal(gl, nx, ny, nz); |
---|
563 | 569 | } |
---|
564 | 570 | gl.glColor4f(pv.AO, pv.AO, pv.AO, 1); |
---|
565 | 571 | SetColor(obj, pv); |
---|
.. | .. |
---|
591 | 597 | y += ny * obj.NORMALPUSH; |
---|
592 | 598 | z += nz * obj.NORMALPUSH; |
---|
593 | 599 | |
---|
594 | | - gl.glNormal3f(nx, ny, nz); |
---|
| 600 | + SetGLNormal(gl, nx, ny, nz); |
---|
595 | 601 | } |
---|
596 | 602 | //System.out.println("vertexq = " + qv.s + ", " + qv.t); |
---|
597 | 603 | // boolean locked = false; |
---|
.. | .. |
---|
639 | 645 | y += ny * obj.NORMALPUSH; |
---|
640 | 646 | z += nz * obj.NORMALPUSH; |
---|
641 | 647 | |
---|
642 | | - gl.glNormal3f(nx, ny, nz); |
---|
| 648 | + SetGLNormal(gl, nx, ny, nz); |
---|
643 | 649 | } |
---|
644 | 650 | |
---|
645 | 651 | // if ((dot&4) == 0) |
---|
.. | .. |
---|
875 | 881 | //// tris.postdraw(this); |
---|
876 | 882 | } |
---|
877 | 883 | |
---|
878 | | - static Camera localcamera = new Camera(); |
---|
| 884 | + static Camera localAOcamera = new Camera(); |
---|
879 | 885 | static cVector from = new cVector(); |
---|
880 | 886 | static cVector to = new cVector(); |
---|
881 | 887 | |
---|
.. | .. |
---|
884 | 890 | CameraPane cp = this; |
---|
885 | 891 | |
---|
886 | 892 | Camera keep = cp.RenderCamera(); |
---|
887 | | - cp.renderCamera = localcamera; |
---|
| 893 | + cp.renderCamera = localAOcamera; |
---|
888 | 894 | |
---|
889 | 895 | if (br.trimmed) |
---|
890 | 896 | { |
---|
.. | .. |
---|
902 | 908 | br.positions[i3 + 2] + br.normals[i3 + 2]); |
---|
903 | 909 | LA.xformPos(from, transform, from); |
---|
904 | 910 | LA.xformPos(to, transform, to); // RIGID ONLY |
---|
905 | | - localcamera.setAim(from, to); |
---|
| 911 | + localAOcamera.setAim(from, to); |
---|
906 | 912 | |
---|
907 | 913 | CameraPane.occlusionbuffer.display(); |
---|
908 | 914 | |
---|
.. | .. |
---|
936 | 942 | to.set(v.x+v.norm.x, v.y+v.norm.y, v.z+v.norm.z); |
---|
937 | 943 | LA.xformPos(from, transform, from); |
---|
938 | 944 | LA.xformPos(to, transform, to); // RIGID ONLY |
---|
939 | | - localcamera.setAim(from, to); |
---|
| 945 | + localAOcamera.setAim(from, to); |
---|
940 | 946 | |
---|
941 | 947 | CameraPane.occlusionbuffer.display(); |
---|
942 | 948 | |
---|
.. | .. |
---|
1245 | 1251 | { |
---|
1246 | 1252 | if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0) |
---|
1247 | 1253 | { |
---|
1248 | | - gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]); |
---|
| 1254 | + SetGLNormal(gl, n[count3], n[count3 + 1], n[count3 + 2]); |
---|
1249 | 1255 | } else |
---|
1250 | 1256 | { |
---|
1251 | | - gl.glNormal3f(0, 0, 1); |
---|
| 1257 | + SetGLNormal(gl, 0, 0, 1); |
---|
1252 | 1258 | } |
---|
1253 | 1259 | |
---|
1254 | 1260 | if (c != null) |
---|
.. | .. |
---|
1272 | 1278 | { |
---|
1273 | 1279 | if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0) |
---|
1274 | 1280 | { |
---|
1275 | | - gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]); |
---|
| 1281 | + SetGLNormal(gl, n[count3], n[count3 + 1], n[count3 + 2]); |
---|
1276 | 1282 | } else |
---|
1277 | 1283 | { |
---|
1278 | | - gl.glNormal3f(0, 0, 1); |
---|
| 1284 | + SetGLNormal(gl, 0, 0, 1); |
---|
1279 | 1285 | } |
---|
1280 | 1286 | if (c != null) |
---|
1281 | 1287 | { |
---|
.. | .. |
---|
1300 | 1306 | { |
---|
1301 | 1307 | if (n[count3] != 0 || n[count3 + 1] != 0 || n[count3 + 2] != 0) |
---|
1302 | 1308 | { |
---|
1303 | | - gl.glNormal3f(n[count3], n[count3 + 1], n[count3 + 2]); |
---|
| 1309 | + SetGLNormal(gl, n[count3], n[count3 + 1], n[count3 + 2]); |
---|
1304 | 1310 | } else |
---|
1305 | 1311 | { |
---|
1306 | | - gl.glNormal3f(0, 0, 1); |
---|
| 1312 | + SetGLNormal(gl, 0, 0, 1); |
---|
1307 | 1313 | } |
---|
1308 | 1314 | if (c != null) |
---|
1309 | 1315 | { |
---|
.. | .. |
---|
1485 | 1491 | { |
---|
1486 | 1492 | if (!selectmode) |
---|
1487 | 1493 | { |
---|
1488 | | - gl.glNormal3f((float) pv.norm.x, (float) pv.norm.y, (float) pv.norm.z); |
---|
| 1494 | + SetGLNormal(gl, (float) pv.norm.x, (float) pv.norm.y, (float) pv.norm.z); |
---|
1489 | 1495 | gl.glColor4f(pv.AO, pv.AO, pv.AO, 1); |
---|
1490 | 1496 | |
---|
1491 | 1497 | if (flipV) |
---|
.. | .. |
---|
1814 | 1820 | |
---|
1815 | 1821 | display.modelParams7[0] = 0; |
---|
1816 | 1822 | display.modelParams7[1] = 1000; |
---|
1817 | | - display.modelParams7[2] = 0; |
---|
| 1823 | + display.modelParams7[2] = material.parallax; |
---|
1818 | 1824 | display.modelParams7[3] = 0; |
---|
1819 | 1825 | |
---|
1820 | 1826 | //display.modelParams6[0] = 100; // criss de bug de bump |
---|
.. | .. |
---|
2047 | 2053 | switch(viewcode) |
---|
2048 | 2054 | { |
---|
2049 | 2055 | case 0: return "main"; |
---|
2050 | | - case 1: return "one"; |
---|
2051 | | - case 2: return "two"; |
---|
2052 | | - case 3: return "three"; |
---|
| 2056 | + case 1: return "Red"; |
---|
| 2057 | + case 2: return "Green"; |
---|
| 2058 | + case 3: return "Blue"; |
---|
2053 | 2059 | case 4: return "light"; |
---|
2054 | 2060 | } |
---|
2055 | 2061 | |
---|
.. | .. |
---|
2470 | 2476 | return CreateBim(bytes, width, height); |
---|
2471 | 2477 | } |
---|
2472 | 2478 | |
---|
| 2479 | + private void SetGLNormal(javax.media.opengl.GL gl, float nx, float ny, float nz) |
---|
| 2480 | + { |
---|
| 2481 | + gl.glNormal3f(nx, ny, nz); |
---|
| 2482 | + |
---|
| 2483 | + if (ny > 0.9 || ny < -0.9) |
---|
| 2484 | + // Ground or ceiling |
---|
| 2485 | + gl.glVertexAttrib3f(4, 1, 0, 0); |
---|
| 2486 | + else |
---|
| 2487 | + // Walls |
---|
| 2488 | + gl.glVertexAttrib3f(4, 0, 1, 0); |
---|
| 2489 | + } |
---|
| 2490 | + |
---|
2473 | 2491 | /**/ |
---|
2474 | 2492 | class CacheTexture |
---|
2475 | 2493 | { |
---|
.. | .. |
---|
2512 | 2530 | com.sun.opengl.util.texture.TextureIO.newTextureData( |
---|
2513 | 2531 | getClass().getClassLoader().getResourceAsStream(name), |
---|
2514 | 2532 | true, |
---|
2515 | | - com.sun.opengl.util.texture.TextureIO.PNG); |
---|
| 2533 | + GetFormat(name)); // com.sun.opengl.util.texture.TextureIO.PNG); |
---|
2516 | 2534 | } catch (java.io.IOException e) |
---|
2517 | 2535 | { |
---|
2518 | 2536 | throw new javax.media.opengl.GLException(e); |
---|
.. | .. |
---|
8778 | 8796 | |
---|
8779 | 8797 | gl.glGetIntegerv(GL.GL_MAX_TEXTURE_STACK_DEPTH, temp, 0); |
---|
8780 | 8798 | MAXSTACK = temp[0]; |
---|
8781 | | - System.out.println("GL_MAX_TEXTURE_STACK_DEPTH = " + MAXSTACK); |
---|
| 8799 | + if (Globals.DEBUG) |
---|
| 8800 | + System.out.println("GL_MAX_TEXTURE_STACK_DEPTH = " + MAXSTACK); |
---|
8782 | 8801 | gl.glGetIntegerv(GL.GL_MAX_MODELVIEW_STACK_DEPTH, temp, 0); |
---|
8783 | 8802 | MAXSTACK = temp[0]; |
---|
8784 | | - System.out.println("GL_MAX_MODELVIEW_STACK_DEPTH = " + MAXSTACK); |
---|
| 8803 | + if (Globals.DEBUG) |
---|
| 8804 | + System.out.println("GL_MAX_MODELVIEW_STACK_DEPTH = " + MAXSTACK); |
---|
8785 | 8805 | |
---|
8786 | 8806 | // Use debug pipeline |
---|
8787 | 8807 | //drawable.setGL(new DebugGL(gl)); // |
---|
.. | .. |
---|
8789 | 8809 | gl = drawable.getGL(); // |
---|
8790 | 8810 | |
---|
8791 | 8811 | GL gl3 = getGL(); |
---|
8792 | | - System.out.println("INIT GL IS: " + gl.getClass().getName()); |
---|
| 8812 | + if (Globals.DEBUG) |
---|
| 8813 | + System.out.println("INIT GL IS: " + gl.getClass().getName()); |
---|
8793 | 8814 | |
---|
8794 | 8815 | |
---|
8795 | 8816 | //float pos[] = { 100, 100, 100, 0 }; |
---|
.. | .. |
---|
9230 | 9251 | |
---|
9231 | 9252 | void LoadEnvy(int which) |
---|
9232 | 9253 | { |
---|
| 9254 | + assert(false); |
---|
| 9255 | + |
---|
9233 | 9256 | String name; |
---|
9234 | 9257 | String ext; |
---|
9235 | 9258 | |
---|
.. | .. |
---|
10680 | 10703 | static boolean init = false; |
---|
10681 | 10704 | |
---|
10682 | 10705 | double[][] matrix = LA.newMatrix(); |
---|
| 10706 | + |
---|
| 10707 | + // This is to refresh the UI of the material panel. |
---|
| 10708 | + ObjEditor patchMaterial; |
---|
10683 | 10709 | |
---|
10684 | 10710 | public void display(GLAutoDrawable drawable) |
---|
10685 | 10711 | { |
---|
| 10712 | + if (patchMaterial.patchMaterial) |
---|
| 10713 | + { |
---|
| 10714 | + patchMaterial.patchMaterial = false; |
---|
| 10715 | + patchMaterial.objectPanel.setSelectedIndex(1); |
---|
| 10716 | + } |
---|
| 10717 | + |
---|
10686 | 10718 | if (Grafreed.savesound && Grafreed.hassound) |
---|
10687 | 10719 | { |
---|
10688 | 10720 | Grafreed.wav.save(); |
---|
.. | .. |
---|
11074 | 11106 | // |
---|
11075 | 11107 | // newenvy = -1; |
---|
11076 | 11108 | |
---|
11077 | | - if (object.skyboxname != null) |
---|
| 11109 | + if (transformMode) // object.skyboxname != null && object.skyboxname.equals("cubemaps/default-skyboxes/rgb")) |
---|
11078 | 11110 | { |
---|
11079 | | - if (!object.skyboxname.equals(this.loadedskyboxname)) |
---|
| 11111 | + if (cubemaprgb == null) |
---|
11080 | 11112 | { |
---|
11081 | | - LoadSkybox(object.skyboxname + "/", object.skyboxext, false); |
---|
11082 | | - loadedskyboxname = object.skyboxname; |
---|
| 11113 | + cubemaprgb = LoadSkybox("cubemaps/default-skyboxes/rgb2" + "/", "jpg", false); |
---|
11083 | 11114 | } |
---|
| 11115 | + |
---|
| 11116 | + cubemap = cubemaprgb; |
---|
11084 | 11117 | } |
---|
11085 | 11118 | else |
---|
11086 | 11119 | { |
---|
11087 | | - cubemap = null; |
---|
11088 | | - loadedskyboxname = null; |
---|
| 11120 | + if (object.skyboxname != null) |
---|
| 11121 | + { |
---|
| 11122 | + if (!object.skyboxname.equals(this.loadedskyboxname)) |
---|
| 11123 | + { |
---|
| 11124 | + if (cubemap != null && cubemap != cubemaprgb) |
---|
| 11125 | + cubemap.dispose(); |
---|
| 11126 | + cubemapcustom = LoadSkybox(object.skyboxname + "/", object.skyboxext, false); |
---|
| 11127 | + loadedskyboxname = object.skyboxname; |
---|
| 11128 | + } |
---|
| 11129 | + } |
---|
| 11130 | + else |
---|
| 11131 | + { |
---|
| 11132 | + cubemapcustom = null; |
---|
| 11133 | + loadedskyboxname = null; |
---|
| 11134 | + } |
---|
| 11135 | + |
---|
| 11136 | + cubemap = cubemapcustom; |
---|
11089 | 11137 | } |
---|
11090 | 11138 | |
---|
11091 | 11139 | ratio = ((double) getWidth()) / getHeight(); |
---|
.. | .. |
---|
12466 | 12514 | String programmin = |
---|
12467 | 12515 | // Min shader |
---|
12468 | 12516 | "!!ARBfp1.0\n" + |
---|
12469 | | - "PARAM zero123 = { 0.0, 1.0, 2, 1.25 };" + |
---|
12470 | | - "PARAM pow2 = { 0.5, 0.25, 0.125, 0.0 };" + |
---|
| 12517 | + "PARAM zero12t = { 0.0, 1.0, 2, 1.25 };" + |
---|
| 12518 | + "PARAM pow_2 = { 0.5, 0.25, 0.125, 0.0 };" + |
---|
| 12519 | + "PARAM pow2 = { 2, 4, 8, 0.0 };" + |
---|
12471 | 12520 | "PARAM one = { 1.0, 1.0, 1.0, 1.0 };" + |
---|
12472 | 12521 | "PARAM eps = { 0.001, 0.001, 0.001, 1.0 };" + |
---|
12473 | 12522 | "PARAM infinity = { 100000000, 100000000, 100000000, 1.0 };" + |
---|
.. | .. |
---|
12482 | 12531 | "TEMP eye;" + |
---|
12483 | 12532 | "TEMP pos;" + |
---|
12484 | 12533 | |
---|
12485 | | - "MAD normal, fragment.color, zero123.z, -zero123.y;" + |
---|
| 12534 | + "MAD normal, fragment.color, zero12t.z, -zero12t.y;" + |
---|
12486 | 12535 | Normalize("normal") + |
---|
12487 | 12536 | "MOV light, state.light[0].position;" + |
---|
12488 | 12537 | "DP3 ndotl.x, light, normal;" + |
---|
| 12538 | + "MAX ndotl.x, ndotl.x, zero12t.x;" + |
---|
12489 | 12539 | |
---|
12490 | 12540 | // shadow |
---|
12491 | 12541 | "MOV pos, fragment.texcoord[1];" + |
---|
.. | .. |
---|
12501 | 12551 | "MUL ndotl.x, ndotl.x, ndotl.z;" + // Shadow |
---|
12502 | 12552 | |
---|
12503 | 12553 | // Backlit |
---|
12504 | | - "MOV pos.w, zero123.y;" + |
---|
| 12554 | + "MOV pos.w, zero12t.y;" + // one |
---|
12505 | 12555 | "DP4 eye.x, pos, light2cam0;" + |
---|
12506 | 12556 | "DP4 eye.y, pos, light2cam1;" + |
---|
12507 | 12557 | "DP4 eye.z, pos, light2cam2;" + |
---|
.. | .. |
---|
12509 | 12559 | |
---|
12510 | 12560 | "DP3 ndotl.y, -eye, normal;" + |
---|
12511 | 12561 | //"MUL ndotl.y, ndotl.y, pow2.x;" + |
---|
12512 | | - "POW ndotl.y, ndotl.y, pow2.z;" + // backlit |
---|
12513 | | - "SUB ndotl.y, zero123.y, ndotl.y;" + |
---|
| 12562 | + "POW ndotl.y, ndotl.y, pow2.x;" + // backlit |
---|
| 12563 | + "SUB ndotl.y, zero12t.y, ndotl.y;" + // 1 - y |
---|
| 12564 | + //"POW ndotl.y, ndotl.y, pow2.z;" + // backlit |
---|
12514 | 12565 | //"SUB ndotl.y, zero123.y, ndotl.y;" + |
---|
12515 | 12566 | //"MUL ndotl.y, ndotl.y, pow2.z;" + |
---|
| 12567 | + "ADD ndotl.y, ndotl.y, one.x;" + |
---|
| 12568 | + "MUL ndotl.y, ndotl.y, pow_2.x;" + |
---|
12516 | 12569 | |
---|
12517 | 12570 | //"MAX ndotl.x, ndotl.x, ndotl.y;" + // Ambient |
---|
12518 | 12571 | //"MAX ndotl.x, ndotl.x, pow2.y;" + // Ambient |
---|
12519 | 12572 | |
---|
12520 | 12573 | // Pigment |
---|
12521 | 12574 | "TEX temp, fragment.texcoord[0], texture[0], 2D;" + |
---|
12522 | | - "LRP temp, zero123.w, temp, one;" + // texture proportion |
---|
12523 | | - "MUL temp, temp, ndotl.x;" + |
---|
12524 | | - |
---|
12525 | | - "MUL temp, temp, zero123.z;" + |
---|
| 12575 | + "LRP temp, zero12t.w, temp, one;" + // texture proportion |
---|
| 12576 | + "MUL temp, temp, zero12t.w;" + // Times x |
---|
12526 | 12577 | |
---|
12527 | 12578 | //"MUL temp, temp, ndotl.y;" + |
---|
| 12579 | + "MAD ndotl.x, pow_2.xxxx, ndotl.yyyy, ndotl.x;" + |
---|
12528 | 12580 | |
---|
12529 | | - "MOV temp.w, zero123.y;" + // reset alpha |
---|
| 12581 | + "MUL temp, temp, ndotl.x;" + // lambert |
---|
| 12582 | + |
---|
| 12583 | + "MOV temp.w, zero12t.y;" + // reset alpha |
---|
12530 | 12584 | "MOV result.color, temp;" + |
---|
12531 | 12585 | "END"; |
---|
12532 | 12586 | |
---|
.. | .. |
---|
12558 | 12612 | "PARAM params4 = program.env[4];" + // anisoV, cameralight, selfshadow, shadow |
---|
12559 | 12613 | "PARAM params5 = program.env[5];" + // texture, opacity, fakedepth, shadowbias |
---|
12560 | 12614 | "PARAM params6 = program.env[6];" + // bump, noise, borderfade, fog punchthrough |
---|
12561 | | - "PARAM params7 = program.env[7];" + // noise power, opacity power |
---|
| 12615 | + "PARAM params7 = program.env[7];" + // noise power, opacity power, parallax |
---|
12562 | 12616 | "PARAM options0 = program.env[63];" + // fog density, intensity, elevation |
---|
12563 | 12617 | "PARAM options1 = program.env[62];" + // fog rgb color |
---|
12564 | 12618 | "PARAM options2 = program.env[61];" + // image intensity, subsurface, lightsheen |
---|
.. | .. |
---|
12803 | 12857 | "POW texSamp.a, texSamp.a, params6.w;" + // fog punch through shortcut |
---|
12804 | 12858 | // mar 2013 ??? "KIL alpha.a;" + |
---|
12805 | 12859 | "MOV alpha, texSamp.aaaa;" + // y;" + |
---|
12806 | | - "KIL alpha.a;" + |
---|
| 12860 | + "KIL alpha.a;" + // not sure with parallax mapping |
---|
12807 | 12861 | /* |
---|
12808 | 12862 | "MUL temp.xy, temp, two;" + |
---|
12809 | 12863 | "TXB bump, temp, texture[0], 2D;" + |
---|
.. | .. |
---|
12889 | 12943 | "SUB bump0, bump0, half;" + |
---|
12890 | 12944 | "ADD bump, bump, bump0;" + |
---|
12891 | 12945 | |
---|
12892 | | - "MOV temp.x, texSamp.a;" + |
---|
12893 | | - "LRP texSamp, params5.x, texSamp, one;" + // texture proportion |
---|
12894 | | - //"LRP texSamp0, params5.x, texSamp0, one;" + |
---|
12895 | | - "MOV texSamp.a, temp.x;" + |
---|
12896 | | - |
---|
12897 | 12946 | // double-sided |
---|
12898 | 12947 | /**/ |
---|
12899 | 12948 | (doublesided?"DP3 temp.z, normal, eye;" + |
---|
.. | .. |
---|
12910 | 12959 | "MOV normald, normal;" + |
---|
12911 | 12960 | "MOV normals, normal;" + |
---|
12912 | 12961 | |
---|
| 12962 | + "MOV temp, fragment.texcoord[4];" + |
---|
| 12963 | + |
---|
12913 | 12964 | // UV base |
---|
12914 | 12965 | //"DP3 UP.x,state.matrix.modelview.row[0],Y;" + |
---|
12915 | 12966 | //"DP3 UP.y,state.matrix.modelview.row[1],Y;" + |
---|
12916 | 12967 | //"DP3 UP.z,state.matrix.modelview.row[2],Y;" + |
---|
12917 | | - "DP3 UP.x,state.matrix.texture[7].row[0],Y;" + |
---|
12918 | | - "DP3 UP.y,state.matrix.texture[7].row[1],Y;" + |
---|
12919 | | - "DP3 UP.z,state.matrix.texture[7].row[2],Y;" + |
---|
| 12968 | + "DP3 UP.x,state.matrix.texture[7].row[0],temp;" + |
---|
| 12969 | + "DP3 UP.y,state.matrix.texture[7].row[1],temp;" + |
---|
| 12970 | + "DP3 UP.z,state.matrix.texture[7].row[2],temp;" + |
---|
| 12971 | + Normalize("UP") + |
---|
| 12972 | + |
---|
12920 | 12973 | "XPD V, normal, UP;" + |
---|
12921 | 12974 | Normalize("V") + |
---|
12922 | 12975 | "XPD U, V, normal;" + |
---|
12923 | 12976 | Normalize("U") + |
---|
12924 | 12977 | |
---|
12925 | 12978 | // parallax mapping |
---|
| 12979 | + |
---|
| 12980 | + "DP3 temp2.x, V, eye;" + |
---|
| 12981 | + "DP3 temp2.y, U, eye;" + |
---|
| 12982 | + "DP3 temp2.z, normal, eye;" + |
---|
| 12983 | + "RCP temp2.z, temp2.z;" + |
---|
| 12984 | + |
---|
| 12985 | + "DP3 temp2.w, texSamp, texSamp;" + // Height |
---|
| 12986 | + "RSQ temp2.w, temp2.w;" + |
---|
| 12987 | + "RCP temp2.w, temp2.w;" + |
---|
| 12988 | + |
---|
| 12989 | + "SUB temp2.w, temp2.w, half;" + |
---|
| 12990 | +// "SGE temp.x, temp2.w, eps.x;" + |
---|
| 12991 | +// "MUL temp2.w, temp2.w, temp.x;" + |
---|
| 12992 | + |
---|
| 12993 | + //"MOV texSamp, U;" + |
---|
| 12994 | + |
---|
| 12995 | + "MUL temp2.z, temp2.z, temp2.w;" + |
---|
| 12996 | + "MUL temp2.z, temp2.z, params7.z;" + // parallax |
---|
| 12997 | + |
---|
| 12998 | + "MUL temp2, temp2, temp2.z;" + |
---|
| 12999 | + |
---|
| 13000 | + "MOV temp, fragment.texcoord[0];" + |
---|
| 13001 | + |
---|
| 13002 | + "SUB temp, temp, temp2;" + |
---|
| 13003 | + |
---|
| 13004 | + "TEX temp, temp, texture[0], 2D;" + |
---|
| 13005 | + "POW temp.a, temp.a, params6.w;" + // punch through |
---|
| 13006 | + |
---|
| 13007 | + "ADD texSamp, temp, texSamp;" + |
---|
| 13008 | + "MUL texSamp.xyz, half, texSamp;" + |
---|
| 13009 | + |
---|
| 13010 | + "MOV alpha, texSamp.aaaa;" + |
---|
| 13011 | + |
---|
| 13012 | +// parallax mapping |
---|
| 13013 | + |
---|
| 13014 | + "MOV temp.x, texSamp.a;" + |
---|
| 13015 | + "LRP texSamp, params5.x, texSamp, one;" + // texture proportion |
---|
| 13016 | + //"LRP texSamp0, params5.x, texSamp0, one;" + |
---|
| 13017 | + "MOV texSamp.a, temp.x;" + |
---|
12926 | 13018 | |
---|
12927 | 13019 | //"MOV temp, fragment.texcoord[0];" + |
---|
12928 | 13020 | // |
---|
.. | .. |
---|
13393 | 13485 | program = programmin; |
---|
13394 | 13486 | } |
---|
13395 | 13487 | |
---|
13396 | | - System.out.print("Program #" + mode + "; instructions = " + program.split(";").length + "; length = " + program.length()); |
---|
13397 | | - System.out.println(" - " + (mode >> 3) + " lights; " + ((mode & 2) == 2 ? "anisoUV " : "") + ((mode & 4) == 4 ? "SoftShadow " : "")); |
---|
| 13488 | + if (Globals.DEBUG) |
---|
| 13489 | + { |
---|
| 13490 | + System.out.print("Program #" + mode + "; instructions = " + program.split(";").length + "; length = " + program.length()); |
---|
| 13491 | + System.out.println(" - " + (mode >> 3) + " lights; " + ((mode & 2) == 2 ? "anisoUV " : "") + ((mode & 4) == 4 ? "SoftShadow " : "")); |
---|
| 13492 | + } |
---|
| 13493 | + |
---|
13398 | 13494 | loadProgram(gl, GL.GL_FRAGMENT_PROGRAM_ARB, program); |
---|
13399 | 13495 | |
---|
13400 | 13496 | //gl.glNewList(displayListID, GL.GL_COMPILE); |
---|
.. | .. |
---|
13441 | 13537 | "\n" + |
---|
13442 | 13538 | "END\n"; |
---|
13443 | 13539 | |
---|
13444 | | - System.out.println("Program shadow #" + 0 + "; length = " + program.length()); |
---|
| 13540 | + if (Globals.DEBUG) |
---|
| 13541 | + System.out.println("Program shadow #" + 0 + "; length = " + program.length()); |
---|
13445 | 13542 | loadProgram(gl, GL.GL_FRAGMENT_PROGRAM_ARB, program); |
---|
13446 | 13543 | |
---|
13447 | 13544 | //gl.glNewList(displayListID, GL.GL_COMPILE); |
---|
.. | .. |
---|
13699 | 13796 | /*static*/ float[] modelParams4 = new float[]{0, 0, 0, 0}; // anisoV, cameralight, selfshadow, shadow |
---|
13700 | 13797 | /*static*/ float[] modelParams5 = new float[]{0, 0, 0, 0}; // texture, opacity, fakedepth, shadowbias |
---|
13701 | 13798 | /*static*/ float[] modelParams6 = new float[]{0, 0, 0, 0}; // bump, noise, borderfade, fog punchthrough |
---|
13702 | | - /*static*/ float[] modelParams7 = new float[]{0, 0, 0, 0}; // noise power, opacity power |
---|
| 13799 | + /*static*/ float[] modelParams7 = new float[]{0, 0, 0, 0}; // noise power, opacity power, parallax |
---|
13703 | 13800 | |
---|
13704 | 13801 | //Object3D.cVector2[] vector2buffer; |
---|
13705 | 13802 | |
---|
.. | .. |
---|
13866 | 13963 | "PARAM p[4] = { state.matrix.projection }; # modelview projection matrix\n" + |
---|
13867 | 13964 | "PARAM zero = { 0.0, 0.0, 0.0, 1.0 };" + |
---|
13868 | 13965 | "PARAM half = { 0.5, 0.5, 0.5, 1.0 };" + |
---|
13869 | | - "PARAM one = { 1.0, 1.0, 1.0, 0.0 };" + |
---|
| 13966 | + "PARAM one = { 1.0, 1.0, 1.0, 1.0 };" + |
---|
13870 | 13967 | "PARAM two = { 2.0, 2.0, 2.0, 1.0 };" + |
---|
13871 | 13968 | "PARAM third = { 0.33333333333, 0.33333333333, 0.33333333333, 1.0 };" + |
---|
13872 | 13969 | //"PARAM v256 = { 256.0, 256.0, 256.0, 1.0 };" + |
---|
.. | .. |
---|
13927 | 14024 | "DP4 temp.x,state.matrix.texture[0].inverse.row[0],vertex.texcoord;" + |
---|
13928 | 14025 | "DP4 temp.y,state.matrix.texture[0].inverse.row[1],vertex.texcoord;" + |
---|
13929 | 14026 | "DP4 temp.z,state.matrix.texture[0].inverse.row[2],vertex.texcoord;" + |
---|
13930 | | - //"MOV result.texcoord, vertex.texcoord;" + |
---|
| 14027 | + //"MOV result.texcoord, vertex.fogcoord;" + |
---|
13931 | 14028 | "MOV result.texcoord, temp;" + |
---|
13932 | 14029 | // border fade |
---|
13933 | 14030 | "MOV result.texcoord[3], vertex.texcoord;" + |
---|
.. | .. |
---|
13974 | 14071 | |
---|
13975 | 14072 | //"ADD temp.z, temp.z, one;" + |
---|
13976 | 14073 | |
---|
13977 | | - "MOV result.color, temp;" |
---|
| 14074 | + "MOV result.texcoord[4], vertex.attrib[4];" + // U dir |
---|
| 14075 | + |
---|
| 14076 | + "MOV result.color, temp;" // Normal |
---|
13978 | 14077 | : "MOV result.color, vertex.color;") + |
---|
13979 | 14078 | ((mode & VP_PROJECTION) != 0 ? "MOV result.color, zero;" |
---|
13980 | 14079 | : "") + |
---|
.. | .. |
---|
14640 | 14739 | void GoDown(int mod) |
---|
14641 | 14740 | { |
---|
14642 | 14741 | MODIFIERS |= COMMAND; |
---|
| 14742 | + boolean isVR = (mouseMode&VR)!=0; |
---|
14643 | 14743 | /**/ |
---|
14644 | 14744 | if((mod&SHIFT) == SHIFT) |
---|
14645 | | - manipCamera.BackForth(0, -speed*delta, 0); // getWidth()); |
---|
| 14745 | + { |
---|
| 14746 | + if (isVR) |
---|
| 14747 | + manipCamera.RotateInterest(0, -speed); |
---|
| 14748 | + else |
---|
| 14749 | + manipCamera.RotatePosition(0, -speed); |
---|
| 14750 | + } |
---|
14646 | 14751 | else |
---|
14647 | | - manipCamera.RotatePosition(0, -speed); |
---|
| 14752 | + manipCamera.BackForth(0, -speed*delta, isVR?1000:0); // getWidth()); |
---|
14648 | 14753 | /**/ |
---|
14649 | 14754 | if ((mod & SHIFT) == SHIFT) |
---|
14650 | 14755 | { |
---|
.. | .. |
---|
14654 | 14759 | mouseMode |= BACKFORTH; |
---|
14655 | 14760 | } |
---|
14656 | 14761 | |
---|
| 14762 | + targetLookAt.set(manipCamera.lookAt); |
---|
| 14763 | + |
---|
14657 | 14764 | //prevX = X = anchorX; |
---|
14658 | 14765 | prevY = Y = anchorY - (int) (renderCamera.Distance()); |
---|
14659 | 14766 | } |
---|
.. | .. |
---|
14662 | 14769 | { |
---|
14663 | 14770 | MODIFIERS |= COMMAND; |
---|
14664 | 14771 | /**/ |
---|
| 14772 | + boolean isVR = (mouseMode&VR)!=0; |
---|
| 14773 | + |
---|
14665 | 14774 | if((mod&SHIFT) == SHIFT) |
---|
14666 | | - manipCamera.BackForth(0, speed*delta, 0); // getWidth()); |
---|
| 14775 | + { |
---|
| 14776 | + if (isVR) |
---|
| 14777 | + manipCamera.RotateInterest(0, speed); |
---|
| 14778 | + else |
---|
| 14779 | + manipCamera.RotatePosition(0, speed); |
---|
| 14780 | + } |
---|
14667 | 14781 | else |
---|
14668 | | - manipCamera.RotatePosition(0, speed); |
---|
| 14782 | + manipCamera.BackForth(0, speed*delta, isVR?1000:0); // getWidth()); |
---|
14669 | 14783 | /**/ |
---|
14670 | 14784 | if ((mod & SHIFT) == SHIFT) |
---|
14671 | 14785 | { |
---|
.. | .. |
---|
14675 | 14789 | mouseMode |= BACKFORTH; |
---|
14676 | 14790 | } |
---|
14677 | 14791 | |
---|
| 14792 | + targetLookAt.set(manipCamera.lookAt); |
---|
| 14793 | + |
---|
14678 | 14794 | //prevX = X = anchorX; |
---|
14679 | 14795 | prevY = Y = anchorY + (int) (renderCamera.Distance()); |
---|
14680 | 14796 | } |
---|
.. | .. |
---|
14684 | 14800 | MODIFIERS |= COMMAND; |
---|
14685 | 14801 | /**/ |
---|
14686 | 14802 | if((mod&SHIFT) == SHIFT) |
---|
14687 | | - manipCamera.Translate(speed*delta, 0, getWidth()); |
---|
| 14803 | + manipCamera.Translate(speed*delta, 0, getWidth()); |
---|
14688 | 14804 | else |
---|
14689 | | - manipCamera.RotatePosition(speed, 0); |
---|
| 14805 | + { |
---|
| 14806 | + if ((mouseMode&VR)!=0) |
---|
| 14807 | + manipCamera.RotateInterest(-speed, 0); |
---|
| 14808 | + else |
---|
| 14809 | + manipCamera.RotatePosition(speed, 0); |
---|
| 14810 | + } |
---|
14690 | 14811 | /**/ |
---|
14691 | 14812 | if ((mod & SHIFT) == SHIFT) |
---|
14692 | 14813 | { |
---|
.. | .. |
---|
14696 | 14817 | mouseMode |= ROTATE; |
---|
14697 | 14818 | } // TRANSLATE; |
---|
14698 | 14819 | |
---|
| 14820 | + targetLookAt.set(manipCamera.lookAt); |
---|
| 14821 | + |
---|
14699 | 14822 | prevX = X = anchorX - 10; // (int)(10*renderCamera.Distance()); |
---|
14700 | 14823 | prevY = Y = anchorY; |
---|
14701 | 14824 | } |
---|
.. | .. |
---|
14705 | 14828 | MODIFIERS |= COMMAND; |
---|
14706 | 14829 | /**/ |
---|
14707 | 14830 | if((mod&SHIFT) == SHIFT) |
---|
14708 | | - manipCamera.Translate(-speed*delta, 0, getWidth()); |
---|
| 14831 | + manipCamera.Translate(-speed*delta, 0, getWidth()); |
---|
14709 | 14832 | else |
---|
14710 | | - manipCamera.RotatePosition(-speed, 0); |
---|
| 14833 | + { |
---|
| 14834 | + if ((mouseMode&VR)!=0) |
---|
| 14835 | + manipCamera.RotateInterest(speed, 0); |
---|
| 14836 | + else |
---|
| 14837 | + manipCamera.RotatePosition(-speed, 0); |
---|
| 14838 | + } |
---|
| 14839 | + |
---|
14711 | 14840 | /**/ |
---|
14712 | 14841 | if ((mod & SHIFT) == SHIFT) |
---|
14713 | 14842 | { |
---|
.. | .. |
---|
14717 | 14846 | mouseMode |= ROTATE; |
---|
14718 | 14847 | } // TRANSLATE; |
---|
14719 | 14848 | |
---|
| 14849 | + targetLookAt.set(manipCamera.lookAt); |
---|
| 14850 | + |
---|
14720 | 14851 | prevX = X = anchorX + 10; // (int)(10*renderCamera.Distance()); |
---|
14721 | 14852 | prevY = Y = anchorY; |
---|
14722 | 14853 | } |
---|
.. | .. |
---|
15219 | 15350 | case 'K': |
---|
15220 | 15351 | KOMPACTTEXTURE ^= true; |
---|
15221 | 15352 | //textures.clear(); |
---|
15222 | | - break; |
---|
15223 | | - case 'P': // Texture Projection macros |
---|
| 15353 | + // break; |
---|
| 15354 | + //case 'P': // Texture Projection macros |
---|
15224 | 15355 | // SAVETEXTURE ^= true; |
---|
15225 | 15356 | macromode = true; |
---|
15226 | 15357 | Udebug = Vdebug = NORMALdebug = false; programInitialized = false; |
---|
.. | .. |
---|
15341 | 15472 | targetLookAt.set(manipCamera.lookAt); |
---|
15342 | 15473 | repaint(); |
---|
15343 | 15474 | break; |
---|
15344 | | - case 'p': |
---|
| 15475 | + case 'P': // p': |
---|
15345 | 15476 | // c'est quoi ca au juste? spherical ^= true; |
---|
15346 | 15477 | Skinshader ^= true; programInitialized = false; |
---|
15347 | 15478 | repaint(); |
---|
.. | .. |
---|
15379 | 15510 | repaint(); |
---|
15380 | 15511 | break; |
---|
15381 | 15512 | case 'O': |
---|
15382 | | - Globals.drawMode = OCCLUSION; // WARNING |
---|
| 15513 | + // Too dangerous. Use menu. Globals.drawMode = OCCLUSION; // WARNING |
---|
15383 | 15514 | repaint(); |
---|
15384 | 15515 | break; |
---|
15385 | 15516 | case 'o': |
---|
.. | .. |
---|
16101 | 16232 | { |
---|
16102 | 16233 | switch (hitSomething) |
---|
16103 | 16234 | { |
---|
16104 | | - case Object3D.hitCenter: gr.setColor(Color.pink); |
---|
| 16235 | + case Object3D.hitCenter: gr.setColor(Color.white); |
---|
16105 | 16236 | gr.drawLine(X, Y, info.bounds.width/2, info.bounds.height/2); |
---|
16106 | 16237 | break; |
---|
16107 | 16238 | case Object3D.hitRotate: gr.setColor(Color.yellow); |
---|
.. | .. |
---|
16127 | 16258 | if (hasMarquee) |
---|
16128 | 16259 | { |
---|
16129 | 16260 | gr.setXORMode(Color.white); |
---|
16130 | | - gr.setColor(Color.red); |
---|
| 16261 | + gr.setColor(Color.white); |
---|
16131 | 16262 | if (!firstime) |
---|
16132 | 16263 | { |
---|
16133 | 16264 | gr.drawRect(prevmarqX, prevmarqY, prevmarqW, prevmarqH); |
---|
.. | .. |
---|
16667 | 16798 | private void DrawSkyBox(GL gl, float ratio) |
---|
16668 | 16799 | { |
---|
16669 | 16800 | if (//envyoff || |
---|
| 16801 | + WIREFRAME || |
---|
16670 | 16802 | cubemap == null) |
---|
16671 | 16803 | { |
---|
16672 | 16804 | gl.glClearColor(BGcolor, BGcolor, BGcolor, 1); |
---|
.. | .. |
---|
16765 | 16897 | gl.glDisable(GL.GL_TEXTURE_GEN_R); |
---|
16766 | 16898 | |
---|
16767 | 16899 | cubemap.disable(); |
---|
16768 | | - ////cubemap.unbind(); |
---|
| 16900 | + //cubemap.dispose(); |
---|
| 16901 | + |
---|
16769 | 16902 | if (CULLFACE) |
---|
16770 | 16903 | { |
---|
16771 | 16904 | gl.glEnable(gl.GL_CULL_FACE); |
---|
.. | .. |
---|
16821 | 16954 | gl.glScalef(1.0f, -1.0f, 1.0f); |
---|
16822 | 16955 | } |
---|
16823 | 16956 | |
---|
16824 | | - gl.glNormal3f(0.0f, 0.0f, 1.0f); |
---|
| 16957 | + SetGLNormal(gl, 0.0f, 0.0f, 1.0f); |
---|
16825 | 16958 | |
---|
16826 | 16959 | float step = 2; // 0.1666f; //0.25f; |
---|
16827 | 16960 | float stepv = 2; // step * 1652 / 998; |
---|
.. | .. |
---|
17301 | 17434 | |
---|
17302 | 17435 | public void init(GLAutoDrawable drawable) |
---|
17303 | 17436 | { |
---|
| 17437 | + if (Globals.DEBUG) |
---|
17304 | 17438 | System.out.println("shadow buffer init"); |
---|
17305 | 17439 | |
---|
17306 | 17440 | GL gl = drawable.getGL(); |
---|
.. | .. |
---|
17529 | 17663 | gl.glFlush(); |
---|
17530 | 17664 | |
---|
17531 | 17665 | /**/ |
---|
17532 | | - gl.glReadPixels(0, 0, OCCLUSION_SIZE, OCCLUSION_SIZE, GL.GL_DEPTH_COMPONENT, GL.GL_FLOAT, occlusionsizebuffer); |
---|
| 17666 | + gl.glReadPixels(0, 0, OCCLUSION_SIZE, OCCLUSION_SIZE, GL.GL_DEPTH_COMPONENT, GL.GL_FLOAT, occlusiondepthbuffer); |
---|
17533 | 17667 | |
---|
17534 | | - float[] pixels = occlusionsizebuffer.array(); |
---|
| 17668 | + float[] depths = occlusiondepthbuffer.array(); |
---|
17535 | 17669 | |
---|
| 17670 | + gl.glReadPixels(0, 0, OCCLUSION_SIZE, OCCLUSION_SIZE, GL.GL_BGRA, GL.GL_UNSIGNED_INT_8_8_8_8_REV, occlusioncolorbuffer); |
---|
| 17671 | + |
---|
| 17672 | + int[] pixels = selectsizebuffer.array(); |
---|
| 17673 | + |
---|
17536 | 17674 | double r = 0, g = 0, b = 0; |
---|
17537 | 17675 | |
---|
17538 | 17676 | double count = 0; |
---|
.. | .. |
---|
17543 | 17681 | |
---|
17544 | 17682 | double FACTOR = 1; |
---|
17545 | 17683 | |
---|
17546 | | - for (int i = 0; i < pixels.length; i++) |
---|
| 17684 | + for (int i = 0; i < depths.length; i++) |
---|
17547 | 17685 | { |
---|
17548 | 17686 | int x = i / OCCLUSION_SIZE - OCCLUSION_SIZE / 2; |
---|
17549 | 17687 | int y = i % OCCLUSION_SIZE - OCCLUSION_SIZE / 2; |
---|
.. | .. |
---|
17626 | 17764 | |
---|
17627 | 17765 | double scale = ray.z; // 1; // cos |
---|
17628 | 17766 | |
---|
17629 | | - float depth = pixels[newindex]; |
---|
| 17767 | + float depth = depths[newindex]; |
---|
17630 | 17768 | |
---|
17631 | 17769 | /* |
---|
17632 | 17770 | int newindex2 = (x + 1) * OCCLUSION_SIZE + y; |
---|
.. | .. |
---|
17823 | 17961 | static IntBuffer AAbuffer; // = IntBuffer.allocate(MAX_SIZE*MAX_SIZE); |
---|
17824 | 17962 | static IntBuffer bigAAbuffer; |
---|
17825 | 17963 | static java.nio.FloatBuffer histogram = BufferUtil.newFloatBuffer(HISTOGRAM_SIZE * 3); |
---|
17826 | | - static IntBuffer texturesizebuffer = IntBuffer.allocate(TEX_SIZE * TEX_SIZE); |
---|
| 17964 | + //static IntBuffer texturesizebuffer = IntBuffer.allocate(TEX_SIZE * TEX_SIZE); |
---|
17827 | 17965 | static IntBuffer selectsizebuffer = IntBuffer.allocate(SELECT_SIZE * SELECT_SIZE); |
---|
17828 | 17966 | static java.nio.FloatBuffer pointselectsizebuffer = java.nio.FloatBuffer.allocate(SELECT_SIZE * SELECT_SIZE); |
---|
17829 | 17967 | //static IntBuffer occlusionsizebuffer = IntBuffer.allocate(OCCLUSION_SIZE * OCCLUSION_SIZE); |
---|
17830 | | - static java.nio.FloatBuffer occlusionsizebuffer = java.nio.FloatBuffer.allocate(OCCLUSION_SIZE * OCCLUSION_SIZE); |
---|
| 17968 | + static java.nio.FloatBuffer occlusiondepthbuffer = java.nio.FloatBuffer.allocate(OCCLUSION_SIZE * OCCLUSION_SIZE); |
---|
| 17969 | + |
---|
| 17970 | + static IntBuffer occlusioncolorbuffer = IntBuffer.allocate(OCCLUSION_SIZE * OCCLUSION_SIZE); |
---|
| 17971 | + |
---|
17831 | 17972 | static BufferedImage bufimage = new BufferedImage(TEX_SIZE, TEX_SIZE, BufferedImage.TYPE_INT_RGB); |
---|
17832 | 17973 | static BufferedImage textest = new cBufferedImage(1, 1, BufferedImage.TYPE_INT_ARGB); |
---|
17833 | 17974 | static java.util.Vector<BufferedImage> billboards = new java.util.Vector<BufferedImage>(); |
---|