Horde3D

Next-Generation Graphics Engine
It is currently 09.12.2021, 08:42

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Depth sorting
PostPosted: 20.07.2008, 12:10 
Offline

Joined: 09.05.2008, 19:02
Posts: 18
Could someone please confirm that when you specify order="BACK_TO_FRONT" in a DrawGeometry this means that the items will be rendered in the order of the furthest away from the camera to the closest to it.

If this is correct can someone please explain why I am getting square borders when rendering particles using this and with depth testing turned on.

I have included a screen shot to try and make it more obvious what I am talking about
http://lmcdowall.co.uk/dare/screen%20shot.JPG

The particle being used is the one included in the demo's and so does have an alpha channel I think


Top
 Profile  
Reply with quote  
 Post subject: Re: Depth sorting
PostPosted: 20.07.2008, 13:18 
Offline

Joined: 03.07.2008, 01:23
Posts: 50
I haven't tested depth sorting myself yet because I have another approach but:

Are you using a shader for the particles (actually, how could you not...)? What have you specified in the render configuration, in the shader file? You can specify different blending modes. These would affect how your rendered objects look like regardless of order, I guess... some of those is probably capable of producing square borders.

"blend function (Values: REPLACE, BLEND, ADD, ADD_BLENDED, MULT) (Default: REPLACE) {optional}"


Top
 Profile  
Reply with quote  
 Post subject: Re: Depth sorting
PostPosted: 20.07.2008, 20:40 
Offline

Joined: 09.05.2008, 19:02
Posts: 18
I'm using ADD_BLEND which produces the correct results when depth writing is off but obviously draws over everything so is less than ideal.


Top
 Profile  
Reply with quote  
 Post subject: Re: Depth sorting
PostPosted: 21.07.2008, 22:32 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Depth sorting is working on a per-node basis. Particles are not sorted, this would usually be rather slow.


Top
 Profile  
Reply with quote  
 Post subject: Re: Depth sorting
PostPosted: 22.07.2008, 03:04 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
lachlanmcdowall wrote:
I'm using ADD_BLEND which produces the correct results when depth writing is off but obviously draws over everything so is less than ideal.
Can depth-writes be disabled just for the particles (and not for everything else)?


Top
 Profile  
Reply with quote  
 Post subject: Re: Depth sorting
PostPosted: 22.07.2008, 10:10 
Offline

Joined: 09.05.2008, 19:02
Posts: 18
DarkAngel wrote:
lachlanmcdowall wrote:
I'm using ADD_BLEND which produces the correct results when depth writing is off but obviously draws over everything so is less than ideal.
Can depth-writes be disabled just for the particles (and not for everything else)?


Yes but doing this obviously cause's particles behind objects to be rendered over everything as no depth testing is carrier out


Top
 Profile  
Reply with quote  
 Post subject: Re: Depth sorting
PostPosted: 22.07.2008, 10:27 
Offline

Joined: 09.05.2008, 19:02
Posts: 18
marciano wrote:
Depth sorting is working on a per-node basis. Particles are not sorted, this would usually be rather slow.


can you suggest a method to allow the rendering of particles within a scene then, espeshally with the defered shaders


Top
 Profile  
Reply with quote  
 Post subject: Re: Depth sorting
PostPosted: 22.07.2008, 22:27 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
lachlanmcdowall wrote:
marciano wrote:
Depth sorting is working on a per-node basis. Particles are not sorted, this would usually be rather slow.


can you suggest a method to allow the rendering of particles within a scene then, espeshally with the defered shaders

We can discuss this in your dedicated thread in the rendering technique section...


Top
 Profile  
Reply with quote  
 Post subject: Re: Depth sorting
PostPosted: 23.07.2008, 04:58 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
lachlanmcdowall wrote:
DarkAngel wrote:
lachlanmcdowall wrote:
I'm using ADD_BLEND which produces the correct results when depth writing is off but obviously draws over everything so is less than ideal.
Can depth-writes be disabled just for the particles (and not for everything else)?
Yes but doing this obviously cause's particles behind objects to be rendered over everything as no depth testing is carrier out
No, it shouldn't - not if testing is still enabled but writes are disabled.

First the scene is rendered with depth writes and depth testing enabled.
Now we have a valid depth buffer for the scene.
Then particles are rendered with depth testing on (so they don't appear in front of objects), but depth writes are disabled, so that they don't modify the existing depth-buffer data (and occlude each other).


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group