KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I got a strange behavior since Xcode 4.5 and the iOS 6 SDK when using textures on my 3D objects. The problem also appears on my mac application when building against OS X 10.8 SDK. I am using OpenGL ES 2.0 on iOS and OpenGL legacy profile ( < 3.0 ) on OS X 10.8. The textures are not placed at there correct coordinates anymore and i have lots of artifacts. The VAOs are correctly uploaded and they look good without texturing. When using XCode 4.4.1 and iOS 5.1 SDK everything is fine. The VAO is exactly the same (checked with OpenGL ES frame capture) and also the texture uniforms are binded correct. Xcode 4.4 VAO Overview Xcode 4.5 VAO Overview XCode 4.4.1 (iOS 5.1 SDK) XCode 4.5 (iOS 6 SDK) Code / Shader Snippet Relevant parts for uploading and processing the texture. I had to strip the shaders to the minium. Vertex shader precision highp float; attribute vec2 a_vTextureCoordinate; uniform mat4 u_mModelViewMatrix; uniform mat4 u_mModelViewMatrixInverse; uniform mat4 u_mProjectionMatrix; uniform mat4 u_mNormalMatrix; void main() { .... // Transform output position gl_Position = u_mProjectionMatrix * u_mModelViewMatrix * a_vPosition; // Pass through texture coordinate v_texcoord = a_vTextureCoordinate.xy; v_vPosition = vec3(u_mModelViewMatrix * a_vPosition); v_vTextureCoordinate = a_vTextureCoordinate.xy; .... } Fragment Shader precision highp float; // location 1 uniform sampler2
Tags (comma-separated)
Save Edits
Cancel