Revision 8426bd6a
Added by Leszek Koltunski about 7 years ago
src/main/java/org/distorted/library/DistortedEffects.java | ||
---|---|---|
294 | 294 |
|
295 | 295 |
float halfZ = halfW*mesh.zFactor; |
296 | 296 |
|
297 |
float mipmap = 1.0f;//surface.mMipmap; |
|
298 |
GLES30.glViewport(0, 0, (int)(mipmap*surface.mWidth), (int)(mipmap*surface.mHeight) ); |
|
299 |
//GLES30.glViewport(0, 0, surface.mWidth, surface.mHeight); |
|
297 |
GLES30.glViewport(0, 0, surface.mWidth, surface.mHeight ); |
|
300 | 298 |
|
301 | 299 |
mMainProgram.useProgram(); |
302 | 300 |
GLES30.glUniform1i(mMainTextureH, 0); |
... | ... | |
317 | 315 |
|
318 | 316 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
319 | 317 |
|
320 |
static void blitPriv(DistortedOutputSurface projection)
|
|
318 |
static void blitPriv(DistortedOutputSurface surface)
|
|
321 | 319 |
{ |
322 | 320 |
mBlitProgram.useProgram(); |
323 | 321 |
|
324 |
float mipmap = 1.0f;//projection.mMipmap; |
|
325 |
GLES30.glViewport(0, 0, (int)(mipmap*projection.mWidth), (int)(mipmap*projection.mHeight) ); |
|
322 |
GLES30.glViewport(0, 0, surface.mWidth, surface.mHeight ); |
|
326 | 323 |
GLES30.glUniform1i(mBlitTextureH, 0); |
327 |
GLES30.glUniform1f( mBlitDepthH , 1.0f-projection.mNear);
|
|
324 |
GLES30.glUniform1f( mBlitDepthH , 1.0f-surface.mNear);
|
|
328 | 325 |
GLES30.glVertexAttribPointer(mBlitProgram.mAttribute[0], 2, GLES30.GL_FLOAT, false, 0, mQuadPositions); |
329 | 326 |
GLES30.glDrawArrays(GLES30.GL_TRIANGLE_STRIP, 0, 4); |
330 | 327 |
} |
Also available in: Unified diff
Mipmap levels!