Revision 5fdae11d
Added by Leszek Koltunski over 7 years ago
| src/main/java/org/distorted/library/main/DistortedOutputSurface.java | ||
|---|---|---|
| 299 | 299 |
float corrH = getHeightCorrection(); |
| 300 | 300 |
|
| 301 | 301 |
GLES31.glViewport(0, 0, mWidth, mHeight); |
| 302 |
GLES31.glBindFramebuffer(GLES31.GL_FRAMEBUFFER, 0); |
|
| 303 |
GLES31.glActiveTexture(GLES31.GL_TEXTURE1); |
|
| 304 |
GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, mDepthStencilH[0]); |
|
| 305 | 302 |
|
| 306 |
DistortedRenderState.switchOffColorDepthStencil();
|
|
| 307 |
DistortedEffects.oitCollapse(this, corrW, corrH );
|
|
| 303 |
// Do the Collapse Pass only if we do have a Depth attachment.
|
|
| 304 |
// Otherwise there's no point (in fact we then would create a feedback loop!)
|
|
| 308 | 305 |
|
| 309 |
GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, 0); |
|
| 306 |
if( mDepthStencilH[0] != 0 ) |
|
| 307 |
{
|
|
| 308 |
GLES31.glBindFramebuffer(GLES31.GL_FRAMEBUFFER, 0); |
|
| 309 |
GLES31.glActiveTexture(GLES31.GL_TEXTURE1); |
|
| 310 |
GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, mDepthStencilH[0]); |
|
| 311 |
DistortedRenderState.switchOffColorDepthStencil(); |
|
| 312 |
DistortedEffects.oitCollapse(this, corrW, corrH); |
|
| 313 |
GLES31.glBindTexture(GLES31.GL_TEXTURE_2D, 0); |
|
| 314 |
} |
|
| 310 | 315 |
|
| 311 | 316 |
setAsOutput(currTime); |
| 312 | 317 |
DistortedRenderState.switchColorDepthOnStencilOff(); |
Also available in: Unified diff
OIT: more fixes