Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Depth Test (SSAO) #210749
06/12/08 15:59
06/12/08 15:59
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
Hey,
Does anyone know the texture name of the Screen Buffer either from Gamestudio or directly from DX9? Im not talking about the stencil buffer but the texture (if Gamestudio uses it) that stores the per-pixel depth values.
Also, if there is none, does anyone know how i can get a depth value manually from a pixel? Thanks

Also, sorry for the delay on my shader collection, I've been in Italy for 2 weeks smile


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Depth Test (SSAO) [Re: Foxfire] #210790
06/12/08 22:07
06/12/08 22:07
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
off the top of my head... write a pp-effect for a view that has a 16-bit or 32-bit floating point texture output (put in the view definition something like bmap = "#1280x1024x14"; where the "14" means 32-bit floating point).

in the pixel shader, output the floating-point depth to the red-channel only.

groovy! you now have a depth map!

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: Depth Test (SSAO) [Re: JibbSmart] #211436
06/16/08 17:58
06/16/08 17:58
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
Thank you very much Julz!
I have found the depth tutorial and am now working on an SSAO shader for gamestudio.

So far the benefits are:
fullscreen processing - affects all entities and can be combined with other per-entity shaders.
speed - effect is 100% independent of scene complexity.
very realistic results in real-time applications

Cons:

I will supply two modes, 16 and 8 sample shaders, both of which are extremely GPU intensive ( 8 sample is less however)

Anyway, I will finish this up ASAP and release a bunch of my shaders for free for use within the Gamestudio Community.

For more on SSAO, visit wikopedia, the article was written by the inventor of SSAO.

Last edited by Foxfire; 06/16/08 17:58.

http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Re: Depth Test (SSAO) [Re: Foxfire] #211634
06/17/08 15:47
06/17/08 15:47
Joined: Jun 2005
Posts: 656
G
Grafton Offline
User
Grafton  Offline
User
G

Joined: Jun 2005
Posts: 656
SSAO sounds interesting Foxfire. Very generous of you to share, looking foward to it.

If you need a depth shader for this, I have one ready specifically designed for SSAO
in GameStudio you can have.



Not two, not one.
Re: Depth Test (SSAO) [Re: Grafton] #212300
06/21/08 13:34
06/21/08 13:34
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
why is it independent from scene complexity? doesn't your depth texture take shorter to render on a simple scene?

Re: Depth Test (SSAO) [Re: Joey] #212373
06/21/08 21:59
06/21/08 21:59
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
I have to agree with Joey. The more complex the scene is, the more polygons have to be rendered by the depthmap shader. Also you will most likely need the scene normals, too. So you have to do an additional render/write a more complex sceneshader (depth in alpha and normals in rgb for example). But then again i have no idea how you will create ssao. Maybe your method only needs a depthmap and no normals.
Well, looking forward to your final result smile


Shade-C EVO Lite-C Shader Framework
Re: Depth Test (SSAO) [Re: BoH_Havoc] #212399
06/22/08 09:01
06/22/08 09:01
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
depthmap is all that's needed, and when Foxfire says "effect is 100% independent of scene complexity" he means the SSAO shader, not the depth-pass.

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: Depth Test (SSAO) [Re: JibbSmart] #212402
06/22/08 09:22
06/22/08 09:22
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
well you can do ssao without the normals. it all depends on the quality you want to acheive.

Re: Depth Test (SSAO) [Re: Joey] #213313
06/26/08 23:07
06/26/08 23:07
Joined: Oct 2005
Posts: 4,771
Bay City, MI
lostclimate Offline
Expert
lostclimate  Offline
Expert

Joined: Oct 2005
Posts: 4,771
Bay City, MI
is there a way to extract this with a6 using the rtt plugin?

Re: Depth Test (SSAO) [Re: lostclimate] #213642
06/29/08 19:33
06/29/08 19:33
Joined: Apr 2008
Posts: 235
TEXCOORD3
Foxfire Offline OP
Member
Foxfire  Offline OP
Member

Joined: Apr 2008
Posts: 235
TEXCOORD3
Hello,
JulzMighty is correct, the depth pass is dependent of scene complexity. However, I have completed a primative model for the shader and it is extremely efficient and runs at only 4 sampler passes (as compared to 8 or 16 by crytek)

In addition, I have stumbled upon a unique meathod of shadowmapping for the A7 engine!!!
The meathod has the following improvments over traditional shadowmapping:

1) it is ultra-high precision and can be used with a single view to calculate dynamic SUN position shadows. right now I have placed the light (sun) 16,000 quants away from the origin where my player model is 100 quants tall.

2) supports alpha transparency and overlay flawlessly by rendering pixels that have 0 alpha as nongeometric terms for DirectX9!!!!

3) 100% scene independent EXCEPT for similar depth test as in SSAO

cons:

1) z-sorting errors leave ugly artifacts on surfaces that are parallel to sun rays.

2) z-sorting errors due to high-range dpth values

solutions:

I will figure out a way to eliminate unwanted shadow tears (which are not common). I will also improve the depth storage to eliminate depth sorting errors.

Each shadow also supports Ambient Occlusion and is thus more defined closer to the object than far away.

Anyway, I will finish these up and share them asap - Mike


http://www.groundtacticsgame.com/
Alienware m17x R Custom laptop
specs:
Intel Core 2 Extreme Quad CPU Q9300
2x Nvidia 280GTX 2GB vram
6GB ddr3 memory@ 1333Mhz
512GB SSD
1200p 17' screen
runs Crysis Warhead on max settings at 1200p at 90 fps
Page 1 of 2 1 2

Moderated by  Blink, Hummel, Superku 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1