Revision 644c21f2
Added by Leszek Koltunski about 4 years ago
src/main/java/org/distorted/library/main/DistortedLibrary.java | ||
---|---|---|
430 | 430 |
|
431 | 431 |
static void drawPrivOIT(DistortedEffects effects, MeshBase mesh, InternalOutputSurface surface, long currTime) |
432 | 432 |
{ |
433 |
float halfX = mesh.getStretchX() / 2.0f; |
|
434 |
float halfY = mesh.getStretchY() / 2.0f; |
|
435 |
float halfZ = mesh.getStretchZ() / 2.0f; |
|
436 |
|
|
437 | 433 |
EffectQueue[] queues = effects.getQueues(); |
438 | 434 |
|
439 |
EffectQueue.compute(queues, currTime, halfX, halfY, halfZ );
|
|
435 |
EffectQueue.compute(queues, currTime); |
|
440 | 436 |
GLES31.glViewport(0, 0, surface.mWidth, surface.mHeight ); |
441 | 437 |
|
442 | 438 |
DistortedLibrary.mMainOITProgram.useProgram(); |
... | ... | |
445 | 441 |
GLES31.glUniform1ui(DistortedLibrary.mMainOITNumRecordsH, (int)(DistortedLibrary.mBufferSize*surface.mWidth*surface.mHeight) ); |
446 | 442 |
mesh.bindVertexAttribs(DistortedLibrary.mMainOITProgram); |
447 | 443 |
|
444 |
float halfX = mesh.getStretchX() / 2.0f; |
|
445 |
float halfY = mesh.getStretchY() / 2.0f; |
|
446 |
float halfZ = mesh.getStretchZ() / 2.0f; |
|
448 | 447 |
float inflate = mesh.getInflate(); |
449 | 448 |
int width = surface.mWidth; |
450 | 449 |
int height = surface.mHeight; |
... | ... | |
467 | 466 |
|
468 | 467 |
static void drawPriv(DistortedEffects effects, MeshBase mesh, InternalOutputSurface surface, long currTime) |
469 | 468 |
{ |
470 |
float halfX = mesh.getStretchX() / 2.0f; |
|
471 |
float halfY = mesh.getStretchY() / 2.0f; |
|
472 |
float halfZ = mesh.getStretchZ() / 2.0f; |
|
473 |
|
|
474 | 469 |
EffectQueue[] queues = effects.getQueues(); |
475 | 470 |
|
476 |
EffectQueue.compute(queues, currTime, halfX, halfY, halfZ );
|
|
471 |
EffectQueue.compute(queues, currTime); |
|
477 | 472 |
GLES31.glViewport(0, 0, surface.mWidth, surface.mHeight ); |
478 | 473 |
|
479 | 474 |
DistortedLibrary.mMainProgram.useProgram(); |
480 | 475 |
GLES31.glUniform1i(DistortedLibrary.mMainTextureH, 0); |
481 | 476 |
mesh.bindVertexAttribs(DistortedLibrary.mMainProgram); |
482 | 477 |
|
478 |
float halfX = mesh.getStretchX() / 2.0f; |
|
479 |
float halfY = mesh.getStretchY() / 2.0f; |
|
480 |
float halfZ = mesh.getStretchZ() / 2.0f; |
|
483 | 481 |
float inflate = mesh.getInflate(); |
484 | 482 |
int width = surface.mWidth; |
485 | 483 |
int height = surface.mHeight; |
Also available in: Unified diff
Moving the Vertex and Fragment centers of effect to the center of the Mesh.