Normand Briere
2019-08-06 b3ae4e889872ca0b9ca76f1d17b2f0b961226729
cMaterial.java
....@@ -79,7 +79,8 @@
7979
8080 void UpdateMaterial(cMaterial anchor, cMaterial current)
8181 {
82
- color *= Factor(anchor.color, current.color);
82
+ //color *= Factor(anchor.color, current.color);
83
+ color = current.color;
8384 //if (anchor.saturation == 0)
8485 // anchor.saturation = 0.001f;
8586 if (anchor.modulation == 0)
....@@ -118,244 +119,244 @@
118119 return current / anchor;
119120 }
120121
121
- void Draw(CameraPane display, boolean selected)
122
- {
123
- //new Exception().printStackTrace();
124
-
125
- if (display.IsFrozen() && !selected || display.ambientOcclusion) // || display.drawMode == display.SHADOW)
126
- {
127
- return;
128
- }
129
-
130
- javax.media.opengl.GL gl = display.GetGL();
131
-
132
- //Color col = Color.getHSBColor(color,modulation,1);
133
- //col.getColorComponents(ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), CameraPane.modelParams0);
134
- if (!multiply)
135
- {
136
- display.color = color;
137
- display.saturation = modulation;
138
- }
139
- else
140
- {
141
- display.color *= color*2;
142
- display.saturation *= modulation*2;
143
- }
144
-
145
- cColor.HSBtoRGB(display.color, display.saturation, 1, display.modelParams0);
146
-
147
- float[] colorV = GraphreeD.colorV;
148
-
149
- /**/
150
- if (display.drawMode == display.DEFAULT) // && display.RENDERPROGRAM == 0)
151
- {
152
- colorV[0] = display.modelParams0[0] * diffuse;
153
- colorV[1] = display.modelParams0[1] * diffuse;
154
- colorV[2] = display.modelParams0[2] * diffuse;
155
- colorV[3] = opacity;
156
-
157
- gl.glColor4f(colorV[0], colorV[1], colorV[2], opacity);
158
- //System.out.println("Opacity = " + opacity);
159
-
160
- gl.glMaterialfv(gl.GL_FRONT, gl.GL_DIFFUSE, colorV, 0);
161
- //color[0] /= 2; color[1] /= 2; color[2] /= 2;
162
- gl.glMaterialfv(gl.GL_BACK, gl.GL_DIFFUSE, colorV, 0);
163
-
164
- float amb = ambient;
165
- if (amb < cameralight)
166
- {
167
- amb = cameralight;
168
- }
169
- colorV[0] = display.modelParams0[0] * diffuse * amb;
170
- colorV[1] = display.modelParams0[1] * diffuse * amb;
171
- colorV[2] = display.modelParams0[2] * diffuse * amb;
172
- gl.glMaterialfv(gl.GL_FRONT, gl.GL_AMBIENT, colorV, 0);
173
- //color[0] /= 2; color[1] /= 2; color[2] /= 2;
174
- gl.glMaterialfv(gl.GL_BACK, gl.GL_AMBIENT, colorV, 0);
175
-
176
- /**/
177
- colorV[0] = ((1 - metalness) + display.modelParams0[0] * metalness) * specular;
178
- colorV[1] = ((1 - metalness) + display.modelParams0[1] * metalness) * specular;
179
- colorV[2] = ((1 - metalness) + display.modelParams0[2] * metalness) * specular;
180
- gl.glMaterialfv(gl.GL_FRONT, gl.GL_SPECULAR, colorV, 0);
181
- //color[0] /= 2; color[1] /= 2; color[2] /= 2;
182
- gl.glMaterialfv(gl.GL_BACK, gl.GL_SPECULAR, colorV, 0);
183
- colorV[0] = 10 / shininess; // 1/0.005f;
184
- //System.out.println("shininess = " + colorV[0]);
185
- if (colorV[0] > 128)
186
- {
187
- colorV[0] = 128;
188
- }
189
- gl.glMaterialfv(gl.GL_FRONT, gl.GL_SHININESS, colorV, 0);
190
- gl.glMaterialfv(gl.GL_BACK, gl.GL_SHININESS, colorV, 0);
191
- /**/
192
- }
193
- /**/
194
-
195
- //selected = false;
196
- selected = selected && display.flash;
197
-
198
- //display.modelParams0[0] = 0; // pigment.r;
199
- //display.modelParams0[1] = 0; // pigment.g;
200
- //display.modelParams0[2] = 0; // pigment.b;
201
- if (!multiply)
202
- {
203
- display.modelParams0[3] = metalness;
204
- display.modelParams1[0] = diffuse;
205
- display.modelParams1[1] = specular;
206
- display.modelParams1[2] = 1 / shininess;
207
- display.modelParams1[3] = shift;
208
- display.modelParams2[0] = ambient;
209
- display.modelParams2[1] = lightarea;
210
- //System.out.println("light area = " + lightarea);
211
- display.modelParams2[2] = 1 / factor; // diffuseness
212
- display.modelParams2[3] = velvet;
213
- display.modelParams3[0] = sheen;
214
- display.modelParams3[1] = subsurface;
215
- display.modelParams3[2] = bump; // backlit
216
- display.modelParams3[3] = aniso;
217
- display.modelParams4[0] = anisoV;
218
- display.modelParams4[1] = selected ? 100 : cameralight;
219
- //System.out.println("selected = " + selected);
220
- display.modelParams4[2] = diffuseness;
221
- display.modelParams4[3] = shadow;
222
- display.modelParams5[0] = texture;
223
- display.modelParams5[1] = opacity;
224
- display.modelParams5[2] = fakedepth;
225
- display.modelParams5[3] = CameraPane.SHADOWCULLFACE ? 0f : (shadowbias - 0.005f) / 10;
226
- }
227
- else
228
- {
229
- display.modelParams0[3] *= metalness*2;
230
- display.modelParams1[0] *= diffuse*2;
231
- display.modelParams1[1] *= specular*2;
232
- display.modelParams1[2] *= shininess*2;
233
- display.modelParams1[3] *= shift*2;
234
- display.modelParams2[0] *= ambient*2;
235
- display.modelParams2[1] *= lightarea*2;
236
- display.modelParams2[2] *= factor*2;
237
- display.modelParams2[3] *= velvet*2;
238
- display.modelParams3[0] *= sheen*2;
239
- display.modelParams3[1] *= subsurface*2;
240
- display.modelParams3[2] *= bump*2;
241
- display.modelParams3[3] *= aniso*2;
242
- display.modelParams4[0] *= anisoV*2;
243
- display.modelParams4[1] *= cameralight*2;
244
- //System.out.println("selected = " + selected);
245
- display.modelParams4[2] *= diffuseness*2;
246
- display.modelParams4[3] *= shadow*2;
247
- display.modelParams5[0] *= texture*2;
248
- display.modelParams5[1] *= opacity*2;
249
- display.modelParams5[2] *= fakedepth*2;
250
- display.modelParams5[3] *= shadowbias*2;
251
- }
252
-
253
- display.modelParams6[0] = 0;
254
- display.modelParams6[1] = 0;
255
- display.modelParams6[2] = 0;
256
- display.modelParams6[3] = 0;
257
-
258
- display.modelParams7[0] = 0;
259
- display.modelParams7[1] = 1000;
260
- display.modelParams7[2] = 0;
261
- display.modelParams7[3] = 0;
262
-
263
- display.modelParams6[0] = 100; // criss de bug de bump
264
-
265
- Object3D.cVector2[] extparams = display.vector2buffer;
266
- if (extparams != null && extparams.length > 0 && extparams[0] != null)
267
- {
268
- display.modelParams6[0] = extparams[0].x / 1000.0f; // bump
269
- display.modelParams6[1] = extparams[0].y / 1000.0f; // noise
270
- if (extparams.length > 1)
271
- {
272
- display.modelParams6[2] = extparams[1].x / 1000.0f; // borderfade
273
- display.modelParams6[3] = extparams[1].y / 1000.0f; // (float)Math.exp(-extparams[1].y / 1000.0f); // fog punchthrough
274
- if (extparams.length > 2)
275
- {
276
- display.modelParams7[0] = extparams[2].x / 1000.0f; // noise power
277
- float x = extparams[2].y / 1000.0f;
278
- //if (x == 0)
279
- // x = 1f;
280
- display.modelParams7[1] = 1 / x / x / x / x / x / x / x / x / x / x / x / x / x; // (float)Math.pow(-Math.log((extparams[2].y+0.00) / 1000.0f), 1); // opacity power
281
- if (extparams[2].y > 0)
282
- {
283
- //System.out.println("extparams[1].y = " + extparams[1].y);
284
- //System.out.println("extparams[2].y = " + extparams[2].y);
285
- //System.out.println("opacity power = " + display.modelParams7[1]);
286
- }
287
- }
288
- }
289
- }
290
-
291
- //if (display.modelParams6[2] != 0)
292
- /*
293
- System.out.println("modelParams0[0] = " + display.modelParams0[0]);
294
- System.out.println("modelParams0[1] = " + display.modelParams0[1]);
295
- System.out.println("modelParams0[2] = " + display.modelParams0[2]);
296
- System.out.println("modelParams0[3] = " + display.modelParams0[3]);
297
- System.out.println("modelParams1[0] = " + display.modelParams1[0]);
298
- System.out.println("modelParams1[1] = " + display.modelParams1[1]);
299
- System.out.println("modelParams1[2] = " + display.modelParams1[2]);
300
- System.out.println("modelParams1[3] = " + display.modelParams1[3]);
301
- System.out.println("modelParams2[0] = " + display.modelParams2[0]);
302
- System.out.println("modelParams2[1] = " + display.modelParams2[1]);
303
- System.out.println("modelParams2[2] = " + display.modelParams2[2]);
304
- System.out.println("modelParams2[3] = " + display.modelParams2[3]);
305
- System.out.println("modelParams3[0] = " + display.modelParams3[0]);
306
- System.out.println("modelParams3[1] = " + display.modelParams3[1]);
307
- System.out.println("modelParams3[2] = " + display.modelParams3[2]);
308
- System.out.println("modelParams3[3] = " + display.modelParams3[3]);
309
- System.out.println("modelParams4[0] = " + display.modelParams4[0]);
310
- System.out.println("modelParams4[1] = " + display.modelParams4[1]);
311
- System.out.println("modelParams4[2] = " + display.modelParams4[2]);
312
- System.out.println("modelParams4[3] = " + display.modelParams4[3]);
313
- System.out.println("modelParams5[0] = " + display.modelParams5[0]);
314
- System.out.println("modelParams5[1] = " + display.modelParams5[1]);
315
- System.out.println("modelParams5[2] = " + display.modelParams5[2]);
316
- System.out.println("modelParams5[3] = " + display.modelParams5[3]);
317
- System.out.println("modelParams6[0] = " + display.modelParams6[0]);
318
- System.out.println("modelParams6[1] = " + display.modelParams6[1]);
319
- System.out.println("modelParams6[2] = " + display.modelParams6[2]);
320
- System.out.println("modelParams6[3] = " + display.modelParams6[3]);
321
- System.out.println("modelParams7[0] = " + display.modelParams7[0]);
322
- System.out.println("modelParams7[1] = " + display.modelParams7[1]);
323
- System.out.println("modelParams7[2] = " + display.modelParams7[2]);
324
- System.out.println("modelParams7[3] = " + display.modelParams7[3]);
325
- /**/
326
- //assert (display.modelParams6[2] == 0);
327
-
328
- //System.out.println("noise power = " + display.modelParams7[0]);
329
- //System.out.println("shadowbias = " + shadowbias);
330
-
331
- gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 0, display.modelParams0, 0);
332
- gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 1, display.modelParams1, 0);
333
- gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 2, display.modelParams2, 0);
334
- gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 3, display.modelParams3, 0);
335
- gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 4, display.modelParams4, 0);
336
- gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 5, display.modelParams5, 0);
337
- gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 6, display.modelParams6, 0);
338
- gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 7, display.modelParams7, 0);
339
-
340
- int mode = display.FP_SHADER;
341
-
342
- if (aniso != anisoV || aniso > 0.002)
343
- {
344
- mode |= display.FP_ANISO;
345
- }
346
-
347
- display.EnableProgram(mode);
348
-
349
- //System.out.println("opacity power = " + display.modelParams7[1]);
350
-
351
- if (!multiply)
352
- {
353
- if (display.drawMode == CameraPane.SHADOW)
354
- gl.glDepthMask(opacity >= 0.9 && display.modelParams7[1] > 0.1);
355
- else
356
- gl.glDepthMask(opacity >= 0.99);
357
- }
358
- }
122
+// void Draw(iCameraPane display, boolean selected)
123
+// {
124
+// //new Exception().printStackTrace();
125
+//
126
+// if (display.IsFrozen() && !selected || display.IsAmbientOcclusionOn()) // || display.drawMode == display.SHADOW)
127
+// {
128
+// return;
129
+// }
130
+//
131
+// javax.media.opengl.GL gl = display.GetGL();
132
+//
133
+// //Color col = Color.getHSBColor(color,modulation,1);
134
+// //col.getColorComponents(ColorSpace.getInstance(ColorSpace.CS_LINEAR_RGB), CameraPane.modelParams0);
135
+// if (!multiply)
136
+// {
137
+// display.color = color;
138
+// display.saturation = modulation;
139
+// }
140
+// else
141
+// {
142
+// display.color *= color*2;
143
+// display.saturation *= modulation*2;
144
+// }
145
+//
146
+// cColor.HSBtoRGB(display.color, display.saturation, 1, display.modelParams0);
147
+//
148
+// float[] colorV = GrafreeD.colorV;
149
+//
150
+// /**/
151
+// if (display.drawMode == display.DEFAULT) // && display.RENDERPROGRAM == 0)
152
+// {
153
+// colorV[0] = display.modelParams0[0] * diffuse;
154
+// colorV[1] = display.modelParams0[1] * diffuse;
155
+// colorV[2] = display.modelParams0[2] * diffuse;
156
+// colorV[3] = opacity;
157
+//
158
+// gl.glColor4f(colorV[0], colorV[1], colorV[2], opacity);
159
+// //System.out.println("Opacity = " + opacity);
160
+//
161
+// gl.glMaterialfv(gl.GL_FRONT, gl.GL_DIFFUSE, colorV, 0);
162
+// //color[0] /= 2; color[1] /= 2; color[2] /= 2;
163
+// gl.glMaterialfv(gl.GL_BACK, gl.GL_DIFFUSE, colorV, 0);
164
+//
165
+// float amb = ambient;
166
+// if (amb < cameralight)
167
+// {
168
+// amb = cameralight;
169
+// }
170
+// colorV[0] = display.modelParams0[0] * diffuse * amb;
171
+// colorV[1] = display.modelParams0[1] * diffuse * amb;
172
+// colorV[2] = display.modelParams0[2] * diffuse * amb;
173
+// gl.glMaterialfv(gl.GL_FRONT, gl.GL_AMBIENT, colorV, 0);
174
+// //color[0] /= 2; color[1] /= 2; color[2] /= 2;
175
+// gl.glMaterialfv(gl.GL_BACK, gl.GL_AMBIENT, colorV, 0);
176
+//
177
+// /**/
178
+// colorV[0] = ((1 - metalness) + display.modelParams0[0] * metalness) * specular;
179
+// colorV[1] = ((1 - metalness) + display.modelParams0[1] * metalness) * specular;
180
+// colorV[2] = ((1 - metalness) + display.modelParams0[2] * metalness) * specular;
181
+// gl.glMaterialfv(gl.GL_FRONT, gl.GL_SPECULAR, colorV, 0);
182
+// //color[0] /= 2; color[1] /= 2; color[2] /= 2;
183
+// gl.glMaterialfv(gl.GL_BACK, gl.GL_SPECULAR, colorV, 0);
184
+// colorV[0] = 10 / shininess; // 1/0.005f;
185
+// //System.out.println("shininess = " + colorV[0]);
186
+// if (colorV[0] > 128)
187
+// {
188
+// colorV[0] = 128;
189
+// }
190
+// gl.glMaterialfv(gl.GL_FRONT, gl.GL_SHININESS, colorV, 0);
191
+// gl.glMaterialfv(gl.GL_BACK, gl.GL_SHININESS, colorV, 0);
192
+// /**/
193
+// }
194
+// /**/
195
+//
196
+// //selected = false;
197
+// selected = selected && display.flash;
198
+//
199
+// //display.modelParams0[0] = 0; // pigment.r;
200
+// //display.modelParams0[1] = 0; // pigment.g;
201
+// //display.modelParams0[2] = 0; // pigment.b;
202
+// if (!multiply)
203
+// {
204
+// display.modelParams0[3] = metalness;
205
+// display.modelParams1[0] = diffuse;
206
+// display.modelParams1[1] = specular;
207
+// display.modelParams1[2] = 1 / shininess;
208
+// display.modelParams1[3] = shift;
209
+// display.modelParams2[0] = ambient;
210
+// display.modelParams2[1] = lightarea;
211
+// //System.out.println("light area = " + lightarea);
212
+// display.modelParams2[2] = 1 / factor; // diffuseness
213
+// display.modelParams2[3] = velvet;
214
+// display.modelParams3[0] = sheen;
215
+// display.modelParams3[1] = subsurface;
216
+// display.modelParams3[2] = bump; // backlit
217
+// display.modelParams3[3] = aniso;
218
+// display.modelParams4[0] = anisoV;
219
+// display.modelParams4[1] = selected ? 100 : cameralight;
220
+// //System.out.println("selected = " + selected);
221
+// display.modelParams4[2] = diffuseness;
222
+// display.modelParams4[3] = shadow;
223
+// display.modelParams5[0] = texture;
224
+// display.modelParams5[1] = opacity;
225
+// display.modelParams5[2] = fakedepth;
226
+// display.modelParams5[3] = CameraPane.SHADOWCULLFACE ? 0f : (shadowbias - 0.005f) / 10;
227
+// }
228
+// else
229
+// {
230
+// display.modelParams0[3] *= metalness*2;
231
+// display.modelParams1[0] *= diffuse*2;
232
+// display.modelParams1[1] *= specular*2;
233
+// display.modelParams1[2] *= shininess*2;
234
+// display.modelParams1[3] *= shift*2;
235
+// display.modelParams2[0] *= ambient*2;
236
+// display.modelParams2[1] *= lightarea*2;
237
+// display.modelParams2[2] *= factor*2;
238
+// display.modelParams2[3] *= velvet*2;
239
+// display.modelParams3[0] *= sheen*2;
240
+// display.modelParams3[1] *= subsurface*2;
241
+// display.modelParams3[2] *= bump*2;
242
+// display.modelParams3[3] *= aniso*2;
243
+// display.modelParams4[0] *= anisoV*2;
244
+// display.modelParams4[1] *= cameralight*2;
245
+// //System.out.println("selected = " + selected);
246
+// display.modelParams4[2] *= diffuseness*2;
247
+// display.modelParams4[3] *= shadow*2;
248
+// display.modelParams5[0] *= texture*2;
249
+// display.modelParams5[1] *= opacity*2;
250
+// display.modelParams5[2] *= fakedepth*2;
251
+// display.modelParams5[3] *= shadowbias*2;
252
+// }
253
+//
254
+// display.modelParams6[0] = 0;
255
+// display.modelParams6[1] = 0;
256
+// display.modelParams6[2] = 0;
257
+// display.modelParams6[3] = 0;
258
+//
259
+// display.modelParams7[0] = 0;
260
+// display.modelParams7[1] = 1000;
261
+// display.modelParams7[2] = 0;
262
+// display.modelParams7[3] = 0;
263
+//
264
+// display.modelParams6[0] = 100; // criss de bug de bump
265
+//
266
+// Object3D.cVector2[] extparams = display.vector2buffer;
267
+// if (extparams != null && extparams.length > 0 && extparams[0] != null)
268
+// {
269
+// display.modelParams6[0] = extparams[0].x / 1000.0f; // bump
270
+// display.modelParams6[1] = extparams[0].y / 1000.0f; // noise
271
+// if (extparams.length > 1)
272
+// {
273
+// display.modelParams6[2] = extparams[1].x / 1000.0f; // borderfade
274
+// display.modelParams6[3] = extparams[1].y / 1000.0f; // (float)Math.exp(-extparams[1].y / 1000.0f); // fog punchthrough
275
+// if (extparams.length > 2)
276
+// {
277
+// display.modelParams7[0] = extparams[2].x / 1000.0f; // noise power
278
+// float x = extparams[2].y / 1000.0f;
279
+// //if (x == 0)
280
+// // x = 1f;
281
+// display.modelParams7[1] = 1 / x / x / x / x / x / x / x / x / x / x / x / x / x; // (float)Math.pow(-Math.log((extparams[2].y+0.00) / 1000.0f), 1); // opacity power
282
+// if (extparams[2].y > 0)
283
+// {
284
+// //System.out.println("extparams[1].y = " + extparams[1].y);
285
+// //System.out.println("extparams[2].y = " + extparams[2].y);
286
+// //System.out.println("opacity power = " + display.modelParams7[1]);
287
+// }
288
+// }
289
+// }
290
+// }
291
+//
292
+// //if (display.modelParams6[2] != 0)
293
+// /*
294
+// System.out.println("modelParams0[0] = " + display.modelParams0[0]);
295
+// System.out.println("modelParams0[1] = " + display.modelParams0[1]);
296
+// System.out.println("modelParams0[2] = " + display.modelParams0[2]);
297
+// System.out.println("modelParams0[3] = " + display.modelParams0[3]);
298
+// System.out.println("modelParams1[0] = " + display.modelParams1[0]);
299
+// System.out.println("modelParams1[1] = " + display.modelParams1[1]);
300
+// System.out.println("modelParams1[2] = " + display.modelParams1[2]);
301
+// System.out.println("modelParams1[3] = " + display.modelParams1[3]);
302
+// System.out.println("modelParams2[0] = " + display.modelParams2[0]);
303
+// System.out.println("modelParams2[1] = " + display.modelParams2[1]);
304
+// System.out.println("modelParams2[2] = " + display.modelParams2[2]);
305
+// System.out.println("modelParams2[3] = " + display.modelParams2[3]);
306
+// System.out.println("modelParams3[0] = " + display.modelParams3[0]);
307
+// System.out.println("modelParams3[1] = " + display.modelParams3[1]);
308
+// System.out.println("modelParams3[2] = " + display.modelParams3[2]);
309
+// System.out.println("modelParams3[3] = " + display.modelParams3[3]);
310
+// System.out.println("modelParams4[0] = " + display.modelParams4[0]);
311
+// System.out.println("modelParams4[1] = " + display.modelParams4[1]);
312
+// System.out.println("modelParams4[2] = " + display.modelParams4[2]);
313
+// System.out.println("modelParams4[3] = " + display.modelParams4[3]);
314
+// System.out.println("modelParams5[0] = " + display.modelParams5[0]);
315
+// System.out.println("modelParams5[1] = " + display.modelParams5[1]);
316
+// System.out.println("modelParams5[2] = " + display.modelParams5[2]);
317
+// System.out.println("modelParams5[3] = " + display.modelParams5[3]);
318
+// System.out.println("modelParams6[0] = " + display.modelParams6[0]);
319
+// System.out.println("modelParams6[1] = " + display.modelParams6[1]);
320
+// System.out.println("modelParams6[2] = " + display.modelParams6[2]);
321
+// System.out.println("modelParams6[3] = " + display.modelParams6[3]);
322
+// System.out.println("modelParams7[0] = " + display.modelParams7[0]);
323
+// System.out.println("modelParams7[1] = " + display.modelParams7[1]);
324
+// System.out.println("modelParams7[2] = " + display.modelParams7[2]);
325
+// System.out.println("modelParams7[3] = " + display.modelParams7[3]);
326
+// /**/
327
+// //assert (display.modelParams6[2] == 0);
328
+//
329
+// //System.out.println("noise power = " + display.modelParams7[0]);
330
+// //System.out.println("shadowbias = " + shadowbias);
331
+//
332
+// gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 0, display.modelParams0, 0);
333
+// gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 1, display.modelParams1, 0);
334
+// gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 2, display.modelParams2, 0);
335
+// gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 3, display.modelParams3, 0);
336
+// gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 4, display.modelParams4, 0);
337
+// gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 5, display.modelParams5, 0);
338
+// gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 6, display.modelParams6, 0);
339
+// gl.glProgramEnvParameter4fvARB(gl.GL_FRAGMENT_PROGRAM_ARB, 7, display.modelParams7, 0);
340
+//
341
+// int mode = display.FP_SHADER;
342
+//
343
+// if (aniso != anisoV || aniso > 0.002)
344
+// {
345
+// mode |= display.FP_ANISO;
346
+// }
347
+//
348
+// display.EnableProgram(mode);
349
+//
350
+// //System.out.println("opacity power = " + display.modelParams7[1]);
351
+//
352
+// if (!multiply)
353
+// {
354
+// if (display.drawMode == CameraPane.SHADOW)
355
+// gl.glDepthMask(opacity >= 0.9 && display.modelParams7[1] > 0.1);
356
+// else
357
+// gl.glDepthMask(opacity >= 0.99);
358
+// }
359
+// }
359360
360361 float color = 0.5f, modulation /*SATURATION*/ = 0.001f, metalness = 0.001f;
361362 float diffuse = 0.75f, specular = 0.25f, shininess = 0.75f, shift = 1;