depth-buffer Questions

1

I'm creating a 3D globe with elevation: I now want to add click detection to get a 3D world xyz position from a 2D screen xy + depth (from a click). I'm using the following code (inspired from Get...
Evolution asked 2/6 at 11:40

4

Solved

As far as i know, we can't read the Z(depth) value in OpenGL ES 2.0. So I am wondering how we can get the 3D world coordinates from a point on the 2D screen? Actually I have some random thoughts m...
Courtland asked 7/4, 2010 at 23:54

1

I can't figure out how can I get raw depth data from my Xiaomi Redmi Note 8 Pro with rear ToF depth sensor. I've tried: Camera2Format from android samples. No results (and I'm not alone) get phy...
Robb asked 28/11, 2019 at 11:39

2

I'm trying to build a sample Android App to extract the depth map of portrait mode photos taken with the google camera app. I know that it's saved along the blurred photos. I read the Dynamic Dept...
Tuition asked 20/11, 2019 at 15:12

1

Solved

I've been banging my head against this for a while but I cannot figure out if it is possible to create a DepthMask shader for HDRP (as descibed here). For my exact use, I'm trying to create a "h...
Relation asked 15/7, 2019 at 17:35

3

Solved

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.
Feleciafeledy asked 7/4, 2015 at 15:32

1

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. ...
Ecclesiastical asked 25/9, 2018 at 9:23

0

What is the simplest way to save my Depth color mode Texture Render. Can it be done without using replacement shaders on my camera? It seems like most of the work is done just setting the color m...

2

I'm trying to render a sphere as an impostor, but I have a problem in calculating the depth value of the points of the sphere's surface. Here you can see what happens when I move the camera around...
Prieto asked 6/12, 2018 at 11:42

1

Solved

In OpenGL you can linearize a depth value like so: float linearize_depth(float d,float zNear,float zFar) { float z_n = 2.0 * d - 1.0; return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zN...
Nineveh asked 29/6, 2018 at 19:56

2

I would like to display thousands of points on a 3D canvas (in Processing) with a Depth of Field effect. More specifically, I would like to use a z-buffer (depth buffering) to adjust the level of b...
Obliquity asked 4/6, 2018 at 21:22

0

Recently I've been using the Depth of Field shader below (originally from the ofxPostProcessing library for OpenFrameworks) for my Processing sketches. depth.glsl uniform float maxDepth; void m...
Lilah asked 3/6, 2018 at 22:54

2

Solved

Many people use usual perspective matrix with third line like this: (0 0 (n+f)/(n-f) 2*n*f/(n-f)) But it has problem with float precision near far clipping surface. The result is z-fighting. Wha...
Gavin asked 13/12, 2017 at 20:54

4

I read lots of information about getting depth with fragment shader. such as http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=234519 but I still don't know whether ...
Plinth asked 15/10, 2011 at 12:51

1

Solved

What would be the best way of offsetting depth in OpenGL? I currently have index vertex attribute per polygon which I am passing to the Vertex Shader in OpenGL. My goal is to offset the polygons in...
Fructification asked 25/7, 2017 at 22:5

1

Solved

I need to compute 3D coordinates from a screen-space position using a rendered depth-map. Unfortunately, using the regular raytracing is not an option for me because I am dealing with a single geom...
Fruiterer asked 22/5, 2017 at 20:6

1

Solved

In OpenGL, depth buffer values are calculated based on the near and far clipping planes of the scene. (Reference: Getting the true z value from the depth buffer) How does this work in WebGL? My un...
Freeload asked 22/4, 2017 at 20:28

1

I have an application where I want to render depth to a texture using stencil mask. I try GL_DEPTH_STENCIL_OES: Creating texture: glGenFramebuffers(1, fbo); glBindFramebuffer(GL_FRAMEBUFFER, *fbo...
Rainarainah asked 19/4, 2017 at 19:1

2

Solved

I am rendering in 3D multiple objects with textures that have alpha. All the textures load fine but when I try to render them in front of each other I get the following: Left is what I have. Rig...
Moneychanger asked 24/4, 2014 at 22:1

1

Solved

After changing my current deferred renderer to use a logarithmic depth buffer I can not work out, for the life of me, how to reconstruct world-space depth from the depth buffer values. When I had ...
Stephi asked 2/11, 2016 at 5:41

2

Solved

I use SFML to create the window. In this screenshot the cube should be behind the pyramid but it just doesn't work. Here is the minimal code I used: #include <OpenGL/gl.h> #include <Op...
Northumberland asked 28/1, 2012 at 14:8

2

Solved

I need to draw a list of shapes and I am using Direct2D. I get the list of shapes from a file. The list is sorted and the order of the elements inside the file represents the order these shapes wil...
Photolithography asked 6/5, 2016 at 14:48

3

I've managed to implement a logarithmic depth buffer in OpenGL, mainly courtesy of articles from Outerra (You can read them here, here, and here). However, I'm having some issues, and I'm not sure ...
Frodin asked 12/3, 2014 at 22:6

5

Solved

Using the WebGL API, how can I get a value from the depth buffer, or in any other way determine 3D coordinates from screen coordinates (i.e. to find a location clicked on), other than by performing...
Superconductivity asked 7/9, 2011 at 0:10

3

Solved

I'm building a small 3D engine for a game I'm working on. I've got my basics sorted: textured triangles with backface culling. However depth sorting is proving to be a difficult problem. I'm calc...
Concoct asked 17/9, 2010 at 22:18

© 2022 - 2024 — McMap. All rights reserved.