Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [depth]

The tag has no usage guidance.

-1
votes
1answer
72 views

Depth sorting issue

I've been working on a custom tile-based map editor for a while now, and everything works as expected, or so I thought until I've tried rendering the actual map including the dynamic objects as well. ...
0
votes
1answer
24 views

How do I determine distance of a point within a ProBuilder mesh?

As in the title, I have an effect prepped for my game which applies certain derived parameters to a post-processing effect after the player enters a boundary I created with ProBuilder. Finding how far ...
0
votes
0answers
31 views

UE4 : Get Normal, Depth and Semantic Segmentation of rendered scene

I started using Unreal Engine 4 to generate a dataset for machine learning. I'm looking for how to generate images containing the following specifications : Depth Map of the environment Normal Map ...
0
votes
0answers
106 views

What is an alternative method to depth mask for putting holes in geometry in Unity?

I'm trying to put a hole through geometry that another object can visibly go through. A depth mask works perfectly for this, but I've hit a snag: I need objects with transparency to go through the ...
0
votes
0answers
116 views

Improve performance by depth checking drawn objects

So I draw many LINE_STRIPS and they all get rendered on top of each other. I would love to make this more effecient, but I just can't figure out what I have to do. I have performance issues and I ...
7
votes
3answers
966 views

Why is the depth test not done on geometry before rasterization?

It seems the only time depth is used to discard data is during rasterization, i.e. at the fragment level. In the geometry stage, I've only see culling and clipping of vertices. Is it not possible to ...
1
vote
0answers
177 views

Improving Shadow

I need to improve the shadows in my scene. At a first look they don't look too bad: They look awful when the camera gets closer to them, showing weird artifacts. I would like to know what are the ...
0
votes
1answer
46 views

Make character move behind object

I used Tiled Editor for making maps for my own game, I do not run any engine or anything. I have separated terrain layer and object layer in TiledEditor. However I have problem with trees I want to ...
3
votes
3answers
636 views

Chroma depth shader unity

I'm trying to reproduce a post-effect with unity seen in the answer here. Chromadepth answer For the moment I just manage to reproduce the wave effect with a quick edge detection. I tried multiple ...
0
votes
1answer
176 views

Walking over walls - Game maker studio

I am having an issue with the walls in my game. I have set them as objects and used the script: depth = -y; inside their create event. However, when I walk my character in front of them, the ...
0
votes
1answer
195 views

How To Fix Strange White Edges With DOF and Fog in Unity?

I'm using global fog and the standard assets Depth Of Field script but it has a strange effect on the edges of far away objects. How can I make the white edges along the trees blend smoothly into the ...
1
vote
2answers
2k views

Why does my disable z-depth test shader do not work?

I wrote the following shader which purpose is to force draw a mesh over the rest, regardless z-depth : ...
2
votes
2answers
402 views

Why is my depth buffer texture so bright?

https://www.youtube.com/watch?v=QuvAEqgHrMY&feature=youtu.be https://www.youtube.com/watch?v=5ob1JsPIGAs&feature=youtu.be ...
1
vote
1answer
602 views

How to enable depth test with QOpenGLWidget? It renders black screen

Currently I am writing a small application with Qt and OpenGl and I choosed QOpenGLWidget for rendering graphics. That's how I declared my widget: ...
4
votes
2answers
237 views

How to get depth of vertex in 0 - 1 range

I want to get the depth of vertex in 0 to 1 range(like it done in the shader) and I do it like this ...
4
votes
1answer
611 views

Layering with slopes in Unity 2D isometric scene

I'm newer to Unity so bear with me. I'm using Unity2D and so far I have my character up and walking around, colliding properly with his surroundings, and I've ...
5
votes
1answer
661 views

Ideal draw order - sort primarily by distance or material?

When it comes to pre-sorting the draw calls for a given frame, I am aware of two different methods for optimising. The first is to batch draw calls by their material. This minimises shader changes ...
1
vote
0answers
233 views

How to make dynamic DOF from mouse position in Unity 5?

I found a video a while ago for how to make a dynamic DOF in unity. It fires rays from the camera and positions an empty at the location that the ray first hit. How can I change this so that it doesn'...
2
votes
1answer
2k views

SSAO, depth buffer linearization (?)

I'm trying to implement SSAO in my application but it doesn't look as it should. I think that the problem is with depth buffer linearization but I tried almost all methods which I found on the Web and ...
3
votes
1answer
178 views

Strange depth map projection

I'm trying to implement depth-only SSAO and for that, I render a depth map into a texture and pass it to my SSAO shader which then uses it. The problem is that when I try to output the depth map ...
4
votes
0answers
755 views

OpenGL Depth Cubemap with Geometry Shader Not Rendering Correctly

I was having some trouble with cubemaps in OpenGL, and was hoping to get some help. I've been following a tutorial about point light shadow mapping using cubemaps, where a geometry shader is used to ...
1
vote
1answer
783 views

What's wrong with my HLSL depth shader?

I'm trying to render depth texture in XNA 4.0. I'm read few different tutorials several times and realy cannot understand what I'm doing wrong. Depth shader: ...
1
vote
1answer
545 views

GUI.Box z-index for mouseover

So I am drawing an inventory with slots like so: ...
1
vote
0answers
81 views

XNA Billboards dont have correct depth

Im back again with yet another problem :( My current problem is with my billboard effect. Im having trouble trying to get the depth correct so that billboards that are closer to the player are ...
0
votes
2answers
794 views

Z-Value of clip-space position is always 1.0

I render a lot of quads on the screen into z direction (20 x 2000). I want to get the depth value in a final render target. But it looks like z is always 1.0f. I checked the result with the OpenGL ...
1
vote
1answer
438 views

Applying statements to a single instance in Game Maker?

I'm currently in the process of making a platformer, and am currently in the process of creating "depth" into my game, by making Up/Down-W/S control your depth. (Come closer to screen, go further). ...
-1
votes
2answers
318 views

OpenGL Depth Test Errors [closed]

I've been working on this problem for a while now. My problem is that the sphere in the top image, is under-lapping the plane which should have a lower Z value. Although, when depth testing is ...
3
votes
3answers
2k views

How to handle tiles on top of players

I am creating an 2d bird view tile game using the pixijs render framework. Like pokemon or oldtime zelda. In those games you sometimes walk behind buildings where the tile would be drawn on top of ...
1
vote
2answers
945 views

How do I ensure my skybox is always in the background, with OpenGL?

I created a skybox in OpenGL (through LWJGL), but the only way I found to render it behind all objects was to make it very big. This leads to ugly edges between the 6 skybox planes. Optimally, I ...
0
votes
2answers
2k views

Simulating 3D height in 2D scene (also shadows)

I recently stumbled across this http://vimeo.com/99118680 video and was stunned by the beautiful painted art and colors. But mostly I couldn't believe how everything appeared to have three dimensions ...
2
votes
1answer
427 views

XNA 4.0 HLSL - strange depth map

I want to draw my pre-rendered depth map to the scene. I get my depth value in the following way: basically (Pixel Shader) ...
8
votes
2answers
879 views

How do I handle game objects with two depths?

I want to be able to do what you see in the image, but with a single wall. The player should be able to walk on either side of the same object. That is, the same wall is below the hero when I go down ...