Hellcat (remodelling)

Discuss the Wing Commander Series and find the latest information on the Wing Commander Universe privateer mod as well as the standalone mod Wasteland Incident project.
Post Reply
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

I'm lost...
You mean we cannot render with GL_EQUAL while using a shader?
Or that somehow the z-buffer would be overwritten on second pass?
Or you mean that the shader needs to read z-info? If the latter, we could write the z value to RGB on the first pass (plus height field to A if we're planning to use texture offset), or even do this onto another render target that we use read-only on second pass, maybe. (I mean *in addition to* the z-buffer). Generally speaking, though, distance to the eye is too easy to calculate to be worried about accessing the z-buffer, unless I'm missing something...
Last edited by chuck_starchaser on Thu Dec 15, 2005 4:25 pm, edited 1 time in total.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

It's "the latter". But doing that would add yet another render target.
Well... there could be a way with multiple passes per "deferred pass", but still, it's cumbersome and the more cumbersome the higher the overhead, and the higher the overhead the less effective the technique.

So... that's why I don't think it's useful, yet.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Yeah, sorry; I was editing my post still... So to repeat my new edit, why do we need to access z-info? We can easily recalculate z, or better yet, compute distance to the eye, and with more precision, to boot.
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Post by klauss »

The "shading" pass is simply a screen-aligned quad that covers the entire screen, geometry-wise... textured with the output of the previous pass (the four render targets), that produces the final result.
The whole idea is not having to compute/process vertices again, which might be costly (for instance, lots of occluded geometry, or lots of vertex-shader stuff).
So... you don't have the positions of the vertices... only the pixels rendered on those 4 targets.

The first pass, even if rendering to 4 targets, is supposed to be überfast, because it only writes out shading parameters and performs no (or very few and inexpensive) computations, so culling is performed much faster than normal.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Gottcha. (Back to the drawing board...)
chuck_starchaser
Elite
Elite
Posts: 8014
Joined: Fri Sep 05, 2003 4:03 am
Location: Montreal
Contact:

Post by chuck_starchaser »

Hey, I wasn't even the first one to put landing gear in a Hellcat...

Image
Post Reply