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
2 votes
1 answer
195 views

Depth func LESS EQUAL not working as expected

How is it possible that a fragment is generated, passes the depth test but isn't written to the current render target? This is the pixel history I see if I capture a frame in RenderDoc: The fragment ...
leone ruggiero's user avatar
-1 votes
1 answer
191 views

Drawback of painters algorithm:

We know that to scan convert any polygon first we need to pass any 4 tests of Painter's algorithm. Suppose I have two polygon S1 and S2, which order is S1->S2.we see that all 4 tests are failed. ...
S. M.'s user avatar
  • 117
0 votes
0 answers
142 views

Implementing W-buffering in modern GPU

I was trying to figure out how perspective projection matrix works, and somehow I ended up in this rabbit hole of depth buffer precision. It seems to be some interest in a depth buffer where the ...
lvella's user avatar
  • 153
1 vote
0 answers
675 views

How to do Decal Clipping with OpenGL using Depth Buffer comparison?

Basically I'm already drawing decals on top of various flat surfaces and that works great. As soon as the decal approaches the edge of a surface, naturally it doesn't get clipped. Is there a way to ...
JBeurer's user avatar
  • 467
0 votes
1 answer
608 views

Z buffer for large vs small objects

Are there common, tried and tested techniques for making sure that when displaying very large and very small objects, in a 3D environment, those objects don't display in front or behind each other? ...
Matt W's user avatar
  • 203
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
6 votes
1 answer
1k views

overlapping 3d particles not blending nicely when at the same z

I'm working on a 3d particle emitter. It's going pretty good but I'm still having a problem with triangle sorting. As you can see in the photos, there are some particles that are not blending ...
badweasel's user avatar
  • 2,001
2 votes
2 answers
583 views

How scanline rendering finds an intersection with an object

I'm a newbie with graphics and after I read many articles on the web I still don't understand how in rasterizing from a pixel coordinate like (0;0) on the screen the intersection with an object (let's ...
Paul's user avatar
  • 23
3 votes
2 answers
2k views

Scan-Line Z-Buffering Dilemma

I have a set of vertices in 3D space, and for each I retain the following information: Its 3D coordinates (x, y, z). A list of pointers to some of the other vertices with which it's connected by ...
toby's user avatar
  • 176
4 votes
2 answers
658 views

How can I simulate multiple depth channels?

Here's what I'd like to achieve: Rendering a first pass of objects in my scene, using standard depth comparison Rendering another pass of objects in the same scene, but with the following rules: A ...
Nock's user avatar
  • 168