Home › Forums › PowerVR Insider Graphics › Depth texture with GL_REPEAT
This topic contains 0 replies, has 1 voice, and was last updated by PenCyot3 6 years, 2 months ago.
When depth texture is used with GL_REPEAT, texture2D() may fetch black value.This issue did not occur in GL_CLAMP_TO_EDGE.
I tested it in Galaxy S (SC-02B Android 2.3.3 GINGERBREAD.OMKE3).
I made the texture object as follows. All the elements of pixels are 0x7777 then.
glBindTexture( GL_TEXTURE_2D, texture ); glPixelStorei( GL_UNPACK_ALIGNMENT, 1 ); glTexImage2D( GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, 4, 4, 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, pixels );
The following image is screenshot in Galaxy S.
Wrap-mode of texture which an upper triangle uses is GL_REPEAT. Wrap-mode of texturewhich an lower triangle uses is GL_CLAMP_TO_EDGE.
The source code of the application mentioned above ishttp://dl.dropbox.com/u/23346852/ticket-701_5/Test701_5-source.zip(md5sum=37b63dff0b9a7646a0c732d62e5284ac)
The APK file of the application ishttp://dl.dropbox.com/u/23346852/ticket-701_5/Test701_5.apk(md5sum=45576e74c1da1ab6ca026e0525c0c128)
The following image is screenshot in GALAPAGOS 003SH.