Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,534 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
trying to get ssao working, too #179801
01/24/08 21:01
01/24/08 21:01
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
here are some screenies trying to adapt the blender node technique, but well, you'll see that there is a lot of banding and bleeding issue which i was not able to fix by now...





dunno if using a 32 bit floating point texture for the depth map could be the solution, since i cant get it to work.. BMAP* depthMap = "#800x600x14"; is always plain white

does someone knows how to render a 32F depth map??


www.earthcontrol.de
quoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
Re: trying to get ssao working, too [Re: ello] #179802
01/24/08 21:23
01/24/08 21:23
Joined: Apr 2005
Posts: 3,815
Finland
Inestical Offline
Rabbit Developer
Inestical  Offline
Rabbit Developer

Joined: Apr 2005
Posts: 3,815
Finland
Why do you try to use 32bit f, when you're GPU might not support it.. try 16bit floating point instead. 16bits should be enough floating data


"Yesterday was once today's tomorrow."
Re: trying to get ssao working, too [Re: Inestical] #179803
01/24/08 21:33
01/24/08 21:33
Joined: Sep 2002
Posts: 1,604
Deutschland
ChrisB Offline
Serious User
ChrisB  Offline
Serious User

Joined: Sep 2002
Posts: 1,604
Deutschland
Seems to be a trendy to create ssao shaders.
here is mine first try: http://geschwollene-augaepfel.org/ssao/showImage.php
Mine have many errors.
Maybe we should open a new thread where we collect all implementations and discuss different techniques?


www.Swollen-Eyeballs.org
ICQ:169213431
#3dgs@quakenet
Re: trying to get ssao working, too [Re: ChrisB] #179804
01/24/08 21:37
01/24/08 21:37
Joined: Oct 2002
Posts: 8,939
planet.earth
ello Offline OP
Senior Expert
ello  Offline OP
Senior Expert

Joined: Oct 2002
Posts: 8,939
planet.earth
hey, chrisB, yours look quite good to me. well comparable to the one found over at the gamedev forum.

what's your approach?


btw, inestical from what i know the geforce6800 should be able to use 32f

Re: trying to get ssao working, too [Re: ello] #179805
01/24/08 22:44
01/24/08 22:44
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
@ChrisB. Looks really good, only complaint is the 14.5 fps I saw in one shot


xXxGuitar511
- Programmer
Re: trying to get ssao working, too [Re: xXxGuitar511] #179806
01/25/08 00:47
01/25/08 00:47
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Quote:

dunno if using a 32 bit floating point texture for the depth map could be the solution, since i cant get it to work.. BMAP* depthMap = "#800x600x14"; is always plain white


put the depth in the red channel, and you could probably just ignore the green and blue, but i put them on 0, 0, and 1.0 for alpha anyway.

julz


Formerly known as JulzMighty.
I made KarBOOM!
Re: trying to get ssao working, too [Re: JibbSmart] #179807
01/25/08 01:08
01/25/08 01:08
Joined: Mar 2006
Posts: 2,503
SC, United States
xXxGuitar511 Offline
Expert
xXxGuitar511  Offline
Expert

Joined: Mar 2006
Posts: 2,503
SC, United States
why not store the depth in blue and green as well?

Gives you a 256*4= 1024 byte range if you used addition. Pseudo-code:
Code:

out_color.r = clamp(depth , 0, 255);
out_color.g = clamp(depth-256, 0, 255);
out_color.b = clamp(depth-512, 0, 255);
out_color.a = clamp(depth-768, 0, 255);




...or you could use multiplication? giving you a 256+512+1024+2048= 3840 range (at least).Pseudo-code:
Code:

out_color.r = clamp(depth , 0, 255); // 0 - 255
out_color.g = clamp((depth-256)/2 , 0, 255); // 255 - 768
out_color.b = clamp((depth-768)/4 , 0, 255); // 769 - 1792
out_color.a = clamp((depth-3840)/8, 0, 255); // 1793 - 3840



...I'd give it a try, but I don't have my computer anymore, so I can't do shaders. Otherwise I'd be all over SSAO & shadowmapping


xXxGuitar511
- Programmer
Re: trying to get ssao working, too [Re: xXxGuitar511] #179808
01/25/08 02:12
01/25/08 02:12
Joined: Sep 2002
Posts: 8,177
Netherlands
PHeMoX Offline
Senior Expert
PHeMoX  Offline
Senior Expert

Joined: Sep 2002
Posts: 8,177
Netherlands
Trick seems to be to render to the alpha channels instead of rgb channels... it's 8bit per color channel vs. 24Bit alpha channel apparently:
Quote:


ello: The trick is to render to depthmap to the alpha channel and not the rgb channel. The alpha channel is 24Bit whereas the rgb channels are 8 bit each. You might want to have a look at this paper:
http://ati.amd.com/developer/gdc/Scheuermann_DepthOfField.pdf />



Cheers

Re: trying to get ssao working, too [Re: PHeMoX] #179809
01/25/08 02:42
01/25/08 02:42
Joined: Jun 2004
Posts: 655
to your left
BoH_Havoc Offline
User
BoH_Havoc  Offline
User

Joined: Jun 2004
Posts: 655
to your left
wow very impressive shots!

Quote:

dunno if using a 32 bit floating point texture for the depth map could be the solution, since i cant get it to work.. BMAP* depthMap = "#800x600x14"; is always plain white




Did you change your shader to only use the .r channel of the texture? A 16 or 32Bit fp texture only renders to the red channel as far as i know.

keep it up, really impressive!

[edit]
Quote:

Trick seems to be to render to the alpha channels instead of rgb channels... it's 8bit per color channel vs. 24Bit alpha channel apparently:

Quote:

ello: The trick is to render to depthmap to the alpha channel and not the rgb channel. The alpha channel is 24Bit whereas the rgb channels are 8 bit each. You might want to have a look at this paper:
http://ati.amd.com/developer/gdc/Scheuermann_DepthOfField.pdf
/>



Cheers




At the time i wrote this in my DoF thread i really thought that would be the case. But i think i was wrong. I read somewhere that an alpha channel always is 24Bit. However when you look at it that can't be the case. eg 32bit tga = 8Bit Red + 8Bit Green + 8Bit Blue + 8Bit Alpha ... 8+8+8+8 = 32. Can someone confirm this?

Last edited by BoH_Havoc; 01/25/08 02:51.

Shade-C EVO Lite-C Shader Framework
Re: trying to get ssao working, too [Re: PHeMoX] #179810
01/25/08 02:43
01/25/08 02:43
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
no, look at the shader workshop. if you want to use a 32-bit floating point texture (such as in this case), store the depth in the red channel. the others are redundant in this case, i'm pretty sure. you have to output a float4 colour (COLOR0 semantic) but in this case only the red matters.

julz

EDIT: not @ BoH_Havoc, who said what i said before but more clearly.

Last edited by JulzMighty; 01/25/08 02:48.

Formerly known as JulzMighty.
I made KarBOOM!
Page 1 of 3 1 2 3

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