All Questions
Tagged with depth-buffer ios
22
questions
0
votes
0
answers
267
views
iOS OpenglES 3.0 rendering to texture fails with depth attachment
Rendering into texture in my mobile app works fine when the rendertarget texture has no depth attachment. When I add a depth attachment, it stops working on iOS. Apparently can't switch back to the ...
1
vote
0
answers
286
views
Is it possible to downscale depth texture on Metal?
I want to downscale depth texture to half of it width and height and then attach to smaller render buffer for continue rendering.
MTLPixelFormatDepth32Float is read only format for compute shaders.
...
6
votes
1
answer
584
views
Blank depth buffer from ARSCNView in DRAW_QUAD pass of SCNTechnique
I'm trying to do depth-testing in a post-processing step of an AR SceneKit demo. I would need the depth map of the rendere ARSCNView for that. It seems impossible to get it using an SCNTechnique.
I ...
0
votes
1
answer
172
views
OpenGLES 2.0 wrong depth buffer bits
I downloaded this Apple sample code GLEssentials sample code. I want to perform some experiments with depth buffer, so at first I decided to check BUFFER_BITS.
I added next code to OpenGLRenderer.m ...
5
votes
1
answer
966
views
Is there a way to enable blending and depth at the same time in Metal
I have a metal view that displays some textured quads. The textures are loaded from PNGs so are premultiplied. Some of the textures have transparent pixels.
When I enable blending and draw in the ...
2
votes
1
answer
465
views
Open GL ES 2.0 multiple drawElements and draw order
I implemented simple OBJ-parser and using parallelepiped as example model. I added rotation feature based on quaternions. Next goal - adding light. I parsed normals and decided drawing normals as "...
2
votes
1
answer
1k
views
Metal. Why does setting MTLCullMode to none turn off depth comparison?
I an rendering a simple box:
MDLMesh(boxWithExtent: ...)
In my draw loop when I turn off back-face culling:
renderCommandEncoder.setCullMode(.none)
All depth comparison is disabled and sides of ...
3
votes
0
answers
2k
views
Metal API: Improving depth buffer precision
What options does the Metal API offer for increasing the precision of the depth buffer, particularly for objects that are farther away?
I've found that even with the nearZ value set uncomfortably far ...
1
vote
1
answer
926
views
How to enable/disable DepthMask in Metal iOS
I am trying to use Metal to display some 3D objects with complex alpha.
I am getting white edge in same object to object alpha blending. But in different object is working fine.
I had solved this ...
0
votes
1
answer
1k
views
sample GL_DEPTH24_STENCIL8 depth texture error in some IOS device
I have a depth texture which is GL_DEPTH24_STENCIL8( or GL_DEPTH_COMPONENT24), and I can correctly sample this texture on some devices(iPhone5s iPad1), but fail with some invalid pixels. Following is ...
6
votes
3
answers
5k
views
iOS-Metal: How to clear Depth Buffer ? Similar to glClear(GL_DEPTH_BUFFER_BIT) in OpenGL
I need to clear the depth buffer, for which i use glClear(GL_DEPTH_BUFFER_BIT) in OpenGL, how to do in metal ? I have gone through apple's documentation, there is no hint about it.
0
votes
1
answer
213
views
iOS simulator OpenGL depth buffer issue
When running my OpenGL1 app on the simulator, very close positioned polygons flicker/merge into one another (the z value isn't right for these pixels). My machine is an old Mac mini.
Seems this only ...
2
votes
1
answer
876
views
how to set vertexZ or proper zorder in isometric tilemap in cocos2d-x/ how to apply proper depth management in isometric tilemaps in cocos2d-x
i was working with isometric tilemap in cocos2d-x and one problem i'm facing is related to depth management. Player sprite is not properly hiding behind the trees and houses that are placed on ...
0
votes
0
answers
1k
views
OpenGL ES 2.0 plane morph/distortion effect GPUImage iOS
was playing a bit with awesome GPUImage framework and was able to reproduce some "convex"-like effects with fragment shaders.
However, I'm wondering if it's possible to get some more complex plane ...
1
vote
2
answers
832
views
OpenGL ES 1.1 depth buffer not working using MonoTouch on iOS 5
I can't get the depth buffer to work using MonoTouch on iOS 5. I'm using the standard MonoTouch "OpenGL Application" template and added this code to test the depth buffer (OpenGL ES 1.1):
GL.Enable(...