Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/20/24 01:28
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), 645 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 10 of 10 1 2 8 9 10
Re: SSAO development thread [Re: HeelX] #388497
12/03/11 21:25
12/03/11 21:25
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
@Rei: You can create hard normals directly in the pixel shader like so: float3 hard_normal = normalize(cross(ddx(wPos),ddy(wPos))); You only need to pass the world position in the pixel shader. This should work fine for your case. wink

Re: SSAO development thread [Re: Hummel] #388512
12/03/11 22:51
12/03/11 22:51
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Hummel, today I really considered to use normals derived by the same exact method you mentioned instead of sampling the gouraud shaded ones, but as you already said, this leads to hard normals. But if I tweak the blur, it could work for the upscaling.

Question: if I bilinearily downsample the depth image and create worldspace normals from the downsampled perpixel depth values, do I get the same normals if I would have create the perpixel normals from the hires depth values which I would then have downsampled, too???

That would be great, because I could save lots of memory then (and processing time, pushing it down the very long throat of your videocard... gag!).

Last edited by HeelX; 12/03/11 22:52.
Re: SSAO development thread [Re: Hummel] #388513
12/03/11 22:53
12/03/11 22:53
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Nevertheless...

Originally Posted By: Hummel
@Rei: You can create hard normals directly in the pixel shader like so: ...
This doesn't work with my solution at the moment, because I don't offer the opportunity to deliver a custom normal map of the view wink

Re: SSAO development thread [Re: HeelX] #388515
12/03/11 23:05
12/03/11 23:05
Joined: Mar 2006
Posts: 2,252
Hummel Offline
Expert
Hummel  Offline
Expert

Joined: Mar 2006
Posts: 2,252
Quote:
Question: if I bilinearily downsample the depth image and create worldspace normals from the downsampled perpixel depth values, do I get the same normals if I would have create the perpixel normals from the hires depth values which I would then have downsampled, too???
If you would re-normalize the downsampled normals they should be the same you would get when creating them from downsampled depth values. But IŽm not 100% sure. ItŽs worth a try at least. But consider, in a post-processing step youŽll get wrong normals along 'sharp' edges if you dont handle that case separatly.

Re: SSAO development thread [Re: Hummel] #388516
12/03/11 23:11
12/03/11 23:11
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: Hummel
But consider, in a post-processing step youŽll get wrong normals along 'sharp' edges if you dont handle that case separatly.


I know. For that I already use my upsampling stage. If the derivatives over my downsampled depths are producing correct normals as if I would have downsampled the correct normals from hires, I should get visually the same image then.

Re: SSAO development thread [Re: HeelX] #405627
08/03/12 16:39
08/03/12 16:39
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline OP
Senior Expert
HeelX  Offline OP
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Hi, I wanted to ask if anyone is using my SSAO solution with an A7 project? Because I intend to drop A7 support.

Regards,
-Christian

Page 10 of 10 1 2 8 9 10

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