Revision 9ab3b712
Added by Leszek Koltunski over 7 years ago
| src/main/java/org/distorted/library/main/DistortedOutputSurface.java | ||
|---|---|---|
| 356 | 356 |
|
| 357 | 357 |
DistortedRenderState.enableStencil(); |
| 358 | 358 |
|
| 359 |
// we cannot compare DEPTH24_STENCIL8 format to DEPTH32 which oitRender's fragment shader expects. Remount! |
|
| 359 |
// we cannot compare DEPTH24_STENCIL8 format to DEPTH32 which oitRender's fragment shader expects. |
|
| 360 |
|
|
| 360 | 361 |
if( mDepthStencil==BOTH_DEPTH_STENCIL ) |
| 361 | 362 |
{
|
| 362 | 363 |
GLES31.glBindFramebuffer(GLES31.GL_FRAMEBUFFER, mFBOH[0]); |
| 363 | 364 |
GLES31.glFramebufferTexture2D(GLES31.GL_FRAMEBUFFER, GLES31.GL_DEPTH_STENCIL_ATTACHMENT, GLES31.GL_TEXTURE_2D, 0, 0); |
| 364 |
GLES31.glFramebufferTexture2D(GLES31.GL_FRAMEBUFFER, GLES31.GL_DEPTH_ATTACHMENT, GLES31.GL_TEXTURE_2D, mDepthStencilH[0], 0);
|
|
| 365 |
GLES31.glTexParameteri(GLES31.GL_TEXTURE_2D, GLES31.GL_DEPTH_STENCIL_TEXTURE_MODE, GLES31.GL_DEPTH_COMPONENT);
|
|
| 365 | 366 |
} |
| 366 | 367 |
|
| 367 | 368 |
DistortedEffects.oitRender(this, buffer.getWidthCorrection(), buffer.getHeightCorrection() ); |
| ... | ... | |
| 369 | 370 |
if( mDepthStencil==BOTH_DEPTH_STENCIL ) |
| 370 | 371 |
{
|
| 371 | 372 |
GLES31.glBindFramebuffer(GLES31.GL_FRAMEBUFFER, mFBOH[0]); |
| 372 |
GLES31.glFramebufferTexture2D(GLES31.GL_FRAMEBUFFER, GLES31.GL_DEPTH_ATTACHMENT, GLES31.GL_TEXTURE_2D, 0, 0); |
|
| 373 | 373 |
GLES31.glFramebufferTexture2D(GLES31.GL_FRAMEBUFFER, GLES31.GL_DEPTH_STENCIL_ATTACHMENT, GLES31.GL_TEXTURE_2D, mDepthStencilH[0], 0); |
| 374 | 374 |
} |
| 375 | 375 |
|
Also available in: Unified diff
Make us read only the DEPTH part of a DEPTH24_STENCIL8 attachment.