eliminating z-fighting resulting from multi-pass rendering

Started by
14 comments, last by Wilhelm van Huyssteen 14 years, 10 months ago
I don't know how you're missing the answer which was stated multiple times: use the exact same transformations for the final vertex position in each pass.

i.e. mul(worldViewProj, position) != mul(mul(viewProj, world), position)
etc.
Advertisement
likewise im not quite sure how ur missing the problem ive stated multiple times :P

i cant use the exact transformation again since it might have changed in the meantime.. rendering and logick are on different threads
Quote:Original post by EternityZA
i cant use the exact transformation again since it might have changed in the meantime.. rendering and logick are on different threads
So double-buffer your logic updates - changing the data while rendering it is really not a good idea.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

so would "double buffering my logic updates" be something along the lines of what i tried to explain my previous big post?
sorry im stil trying to figure out how exactly i'l need to implement this

thnx
Quote:Original post by EternityZA
likewise im not quite sure how ur missing the problem ive stated multiple times :P

i cant use the exact transformation again since it might have changed in the meantime.. rendering and logick are on different threads


Multiple-pass rendering implies the following:

1) renderScene()    1.a) renderObject()        1.a.1) renderObjectWithPass(0)        1.a.2) renderObjectWithPass(1)        // repeat for rest of passes    // repeat for rest of objects


Logic does not come into the picture at all, every scene render should be rendering all of the passes, thus resulting in multi-pass rendering.

Now - if you're saying that you render the scene, do logic, then render the scene again as a second pass, then we can begin by saying that is not multi-pass rendering, but simply per-frame rendering. If you know how the second render should appear over the first render, you can play with the depth bias functions or perhaps even disable depth checking/writing.
finaly got it working. :P

problem was indeed that the logic thread changed the data as the rendering thread was rendering it and i managed to buffer it.

thnx!

This topic is closed to new replies.

Advertisement