Skip to main content

All Questions

Tagged with
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 ...
Gravitysensation's user avatar
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. ...
Volodymyr B.'s user avatar
  • 3,431
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 ...
Aron Monszpart's user avatar
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 ...
frankWhite's user avatar
  • 1,542
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 ...
Dom Chapman's user avatar
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 "...
frankWhite's user avatar
  • 1,542
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 ...
dugla's user avatar
  • 12.9k
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 ...
llama591's user avatar
  • 463
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 ...
Sarbartha Sengupta's user avatar
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 ...
Joey.Z's user avatar
  • 4,700
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.
VivekParamasivam's user avatar
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 ...
user973224's user avatar
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 ...
Amol Prakash's user avatar
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 ...
dispatch_async's user avatar
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(...
Heiko's user avatar
  • 53

15 30 50 per page