Revision 7a5e538a
Added by Leszek Koltunski over 5 years ago
src/main/java/org/distorted/library/main/DistortedEffects.java | ||
---|---|---|
445 | 445 |
|
446 | 446 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
447 | 447 |
|
448 |
void send(float halfW, float halfH, float halfZ, float margin, DistortedOutputSurface surface, int variant)
|
|
448 |
void send(float halfW, float halfH, float halfZ, float inflate, DistortedOutputSurface surface, int variant)
|
|
449 | 449 |
{ |
450 |
mM.send(surface,halfW,halfH,halfZ,margin,variant);
|
|
451 |
mV.send(variant); |
|
450 |
mM.send(surface,halfW,halfH,halfZ,variant); |
|
451 |
mV.send(inflate,variant);
|
|
452 | 452 |
} |
453 | 453 |
|
454 | 454 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
... | ... | |
471 | 471 |
|
472 | 472 |
mesh.bindVertexAttribs(mMainOITProgram); |
473 | 473 |
|
474 |
mM.send(surface,halfW,halfH,halfZ,0,1); |
|
475 |
mV.send(1); |
|
474 |
float inflate = mesh.getInflate(); |
|
475 |
|
|
476 |
mM.send(surface,halfW,halfH,halfZ,1); |
|
477 |
mV.send(inflate,1); |
|
476 | 478 |
mF.send(1); |
477 | 479 |
|
478 | 480 |
GLES31.glDrawArrays(GLES31.GL_TRIANGLE_STRIP, 0, mesh.getNumVertices() ); |
... | ... | |
480 | 482 |
if( mesh.getShowNormals() ) |
481 | 483 |
{ |
482 | 484 |
mMainProgram.useProgram(); |
483 |
mM.send(surface,halfW,halfH,halfZ,0,0);
|
|
484 |
mV.send(0); |
|
485 |
mM.send(surface,halfW,halfH,halfZ,0); |
|
486 |
mV.send(inflate,0);
|
|
485 | 487 |
mF.send(0); |
486 | 488 |
displayNormals(mesh); |
487 | 489 |
} |
... | ... | |
505 | 507 |
|
506 | 508 |
mesh.bindVertexAttribs(mMainProgram); |
507 | 509 |
|
508 |
mM.send(surface,halfW,halfH,halfZ,0,0);
|
|
509 |
mV.send(0); |
|
510 |
mM.send(surface,halfW,halfH,halfZ,0); |
|
511 |
mV.send( mesh.getInflate(),0);
|
|
510 | 512 |
mF.send(0); |
511 | 513 |
|
512 | 514 |
GLES31.glDrawArrays(GLES31.GL_TRIANGLE_STRIP, 0, mesh.getNumVertices() ); |
Also available in: Unified diff
Progress with Inflate (building block of postprocessing effects: the proper way of marking a halo around a Mesh)
'Inflate' app testing the machanism. MeshFlat appears to be working, now we only need to fill up the per-vertex Inflate vector in the MeshCubes.