Skip to main content

All Questions

Tagged with
3 votes
0 answers
309 views

Avoiding z-fighting when reimplementing Freescape games

I need to avoid z-fighting in exactly co-planar surfaces that are too close to the other solids. I'm re-implementing the Freescape engine in ScummVM (all my code is open-source, available here), and ...
Gustavo Grieco's user avatar
0 votes
0 answers
102 views

Order-independent rendering of 2D sprites

I am using OpenGL to render sprites, using an orthographic projection. Each sprite has a position: (x, y, ...
Eilan Laken's user avatar
0 votes
1 answer
451 views

Why do I still get values from _CameraDepthTexture even if I didn't set depthTextureMode?

I forgot to write this C# code to enable depth from my camera: ...
OtakuFitness's user avatar
1 vote
0 answers
182 views

Z-Fighting mitigation performance overhead

Which of following approaches will have less performance overhead(using threejs renderer)? I am currently have an issue with z-fight for distant objects, while my near/far plane is already set to most ...
Dmytro Brazhnyk's user avatar
0 votes
0 answers
756 views

For drawing many layered 2D tiles, should one use the painter's algorithm, or Z-buffering?

Sorry if this question doesn't make sense, I'm still very new to WebGL / OpenGL. Basically, I'm trying to draw a tilemap similar to the one in Stardew Valley. Here's a screenshot from that game: https:...
Ryan Peschel's user avatar
0 votes
0 answers
42 views

How to always draw a child mesh in front of its parent mesh

I need to display a gizmo-like mesh at runtime, and it must be always in front of its target mesh. How can I achieve that?
Szzzzb1's user avatar
1 vote
3 answers
1k views

Why do we need a depth buffer to display a single 3D cube?

According to a Vulkan tutorial I am following, I will need to create a depth buffer in order to display a 3D cube: However, as far as I understand, depth buffers are used for the Z-buffering ...
bzm3r's user avatar
  • 125
1 vote
1 answer
46 views

Where do the buffer values come from when rendering?

In the textbook I am reading, it talks about fragment tests that are performed when rendering. All of these tests involve comparing the current fragment x value (x can be alpha, color, etc.) with a ...
Ramachandra Junior's user avatar
1 vote
0 answers
326 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 ...
Blue Bug's user avatar
  • 1,112
4 votes
4 answers
476 views

Image-Space coherence of the z-buffer algorithm

I'm reading Hierarchical z-Buffer Visibility by Ned Greene et al. and they state that traditional Z buffering makes reasonably good use of image-space coherence in the course of scan conversion. I ...
0xbadf00d's user avatar
11 votes
3 answers
3k views

Using full resolution of depth buffer for 2D rendering

I'm working on a front-to-back renderer for a 2D engine using an orthographic projection. I want to use the depth buffer to avoid overdraw. I have a 16-bit depth buffer, a camera at Z=100 looking at Z=...
AshleysBrain's user avatar
2 votes
2 answers
2k views

How to determine the visibility of a single vertex, given a viewpoint?

I have a 3D triangle mesh, and I want to know, given a viewpoint (defined by a model, view and projection matrix), if a certain vertex is visible or not. My approach was to render the mesh using ...
Ela782's user avatar
  • 131
8 votes
1 answer
4k views

Self occluding object and alpha blending

Look at the object I've rendered with my app: It's the same screen twice, above the original and below I've drawn (by hand :P) the shape of the mesh of one of plant's leaves. You can clearly see ...
NPS's user avatar
  • 2,334
2 votes
1 answer
4k views

How to best utilize depth buffer precision

Are there strategies to minimize depth buffer precision problems with hyperbolic depth buffers, such as the ones resulting from perspective projection matrices, or depth buffers in general? For ...
TravisG's user avatar
  • 4,422
2 votes
1 answer
610 views

My transparent objects overwrite opaque objects depth and always draw on top?

I have set up an 'Order Independent Transparency' method for drawing my transparent objects. The algorithm can be simplified as follows: DrawOpaqueObjects() DrawTransparentObjects() Drawing the ...
user1423893's user avatar

15 30 50 per page