Quote:
True, but deferring doesn't solve this issue by itself since it doesn't guarantee order anyway. If you want to keep for example information about the "previous" surface that sounds awesome but frankly speaking, I don't know how can you beat MIMD semantics without severing performance in a predictable way.
Depth peeling may be an idea but then how to accumulate the contributions from N layers?
I have to confess that in my system, I had several types of texture targets:
1) Opaque normal: tpycial objects that are "solid"
2) transluscent objects
3) FX
translucsent objects get drawn to their own texture with multipicative blending, so transluscent objects are viewed as filters acting on the light channels, the nice part being that I don't have to do depth peeling and all that hassle... the bad part being that opaque normal objects need to be drawn before the transluscent stuff.
FX objects are for effects like smoke haze, ect.. these have (for now) 2 buffers they write to for data that is fowarded to their differed shaders.
the pipeline I have is:
1)in room of viewpoint:
draw opaque objects, with depth writing and testing and stencil testing
for each portal of the current room
open portal (stencil write)
recurse to room beyond portal
close portal
draw transluscent objects with depth testing but no writing.
draw FX objects with depth writing and testing
2) execute lighing differed shaders to calculate lighting
3) execute FX shaders that are allowed to use the calcualtion of the lighting shader
this sytem works well enough (but it does not handle the situation of when there are multiple FX laters on a single pixel, only the front most FX gets done)
so doing heat haze and refraction are very easy as are selected filtering: for twisted fun I made a simple FX shader which simply used the raw specular texture of the pixel "behind it".. it was kind ofunky to look at, as the model was a mdoel from doom3 (hell knight) beuing animated) but the pixels draw where it was was from the objects behind it, their specular texture... kind of silly, but it was very, very easy to do in this system.. other simply things were to take the pixel as caclulated by the lighting shader, but not use the pixel at, but rather offset by (r*cos t, r*sin t) where r is some reasonable small number and t was time... weird effect, but agian very easy for me to do...
Quote:
Now, to reduce overdraw, lay-z-only has alot of interesting advantages: not only it eats less BW but it also allows double-speed rendering on some cards and gives a correct depth buffer...
Have you considered lay-z-only?
I am going to sound like a bit of a ninnny, but what exaclty is lay-z-only? is it the wiriting of data to off screen buffers which depend on z? then drwaing stuff in a foward render style?
Quote:
On... what system? Are you running on a FX? Are you using FSAA? What resolution? What about aniso?
GeForce6600GT (128MB), AthlonXP 3200+, 1GB RAM. Yes my sytem has trouble running a fair number of the games that come out now.. but with my system I get 8 directional lights, per pixel drawing (bump mapped) at a resolution of 1028x768 (no AA) at a framerate of 60+FPS, under stress tests of a room of mirrors (4 mirrors, so 4 portals) with the room holding over 40 Doom3 models, the frame rate goes to like 20 or 40 FPS, depending on the depth of the recursion (at a recursion depth of 5 levels over 2000 meshes are no culled brining the frame rate down to 10FPS) the actualy number of models drrawn is higher from the mirrors but you get the idea, admittedly I do not do shadows, but under this system adding more models barely affected the frame rate after a while,
Quote:
No, it doesn't.
In forward rendering you compute everything, then depth-test, then (possibly) trash.
In deferred shading (at least as I've analyzed in the past) you compute the data you need then the GPU does depth test and (possibly) trashes - sure, you trash slightly less work. Later, all this stuff is resolved in a FB output in a single batch... which is typically the same as it would before.
In differed shading with heavy lighting you trash a lot less work than with forward rendring, in a typical differed shader one needs the following:
1) color texture
2) normal
3) specular
4) position
position is practically for free, color and specular are texture looks ups and normal is texture lookup together with two vec3 multiply adds... very cheap if that gets trashes via depth or stencil test, or overdrawn. A directional lighting caclulation is much pricier (and worse if there are like 8 lights)... I did an experiemnt where I drew a bunch of models in a line with per pixel point lighting, if early z-cull did not save me the framerate was really bad because of the overdraw... with differed shading, I no longer worry about overdraw.
Quote:
I suppose that's true, yet dynamic prey-style portals are not going to be trivial anyway considering visibility is going to be changed pretty much and not to mention entity behaviour shall be handled accordingly... and prey didn't have so big portal counts to justify the change.
As for static portals (as given by the conventional wisdom) I'm not even sure this makes sense since they're here mostly for culling than a real graphics need.
tell me about it, I implemented a fully dynamic Prey-style portal system on steroids... it was non trivial:
1) intelligent culling of room
a) geometry based (via planes and frustum planes)
b) occlusion based (backout of room when occlusion query is ready and repors not enough pixels)
2) stencil buffer/testing fun
3) depth capping of portals
4) co-ordinate system tracking including
[Edited by - kRogue on November 7, 2007 4:26:09 AM]