Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
4 registered members (dBc, clonman, TipmyPip, 1 invisible), 18,936 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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 | 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