Revision 5ec42229
Added by Leszek Koltunski almost 3 years ago
src/main/java/org/distorted/library/main/DistortedLibrary.java | ||
---|---|---|
160 | 160 |
private static DistortedProgram mBlitDepthProgram; |
161 | 161 |
private static int mBlitDepthTextureH; |
162 | 162 |
private static int mBlitDepthDepthTextureH; |
163 |
private static int mBlitDepthDepthH; |
|
164 | 163 |
private static int mBlitDepthTexCorrH; |
165 | 164 |
|
166 | 165 |
/// Program Handles /// |
... | ... | |
311 | 310 |
int blitDepthProgramH = mBlitDepthProgram.getProgramHandle(); |
312 | 311 |
mBlitDepthTextureH = GLES30.glGetUniformLocation( blitDepthProgramH, "u_Texture"); |
313 | 312 |
mBlitDepthDepthTextureH = GLES30.glGetUniformLocation( blitDepthProgramH, "u_DepthTexture"); |
314 |
mBlitDepthDepthH = GLES30.glGetUniformLocation( blitDepthProgramH, "u_Depth"); |
|
315 | 313 |
mBlitDepthTexCorrH = GLES30.glGetUniformLocation( blitDepthProgramH, "u_TexCorr"); |
316 | 314 |
} |
317 | 315 |
|
... | ... | |
665 | 663 |
GLES30.glUniform1i(mBlitDepthTextureH, 0); |
666 | 664 |
GLES30.glUniform1i(mBlitDepthDepthTextureH, 1); |
667 | 665 |
GLES30.glUniform2f(mBlitDepthTexCorrH, corrW, corrH ); |
668 |
GLES30.glUniform1f( mBlitDepthDepthH , 1.0f-surface.mNear); |
|
669 | 666 |
GLES30.glVertexAttribPointer(mBlitDepthProgram.mAttribute[0], 2, GLES30.GL_FLOAT, false, 0, mQuadPositions); |
670 | 667 |
GLES30.glDrawArrays(GLES30.GL_TRIANGLE_STRIP, 0, 4); |
671 | 668 |
} |
Also available in: Unified diff
Workaround for the fact that one some devices (for example the LG K30's V@415 driver on the Adreno 308) the Glow halo wasn't visible.