|
Re: SSAO
[Re: lostclimate]
#240278
12/10/08 11:20
12/10/08 11:20
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
are you using 16 bit floating point texture, or 32 bit floating point texture? (if you're using BMAP* name = "#widthxheightxbits"; is the "bits" bit 12 or 14?) and if you're doing floating point textures a different way, what way is that?
julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
Re: SSAO
[Re: JibbSmart]
#240334
12/10/08 15:00
12/10/08 15:00
|
Joined: Jun 2004
Posts: 655 to your left
BoH_Havoc
User
|
User
Joined: Jun 2004
Posts: 655
to your left
|
The whole problem has nothing to do with 16 or 32 bit fp. You can even do ssao with 32bit rgba if you encode the depthmap. You have to do a simple depthtest and check if a blurred part of the depthmap intersects with a "far away" part of the depthmap. If this is the case you simply don't apply ssao. And there you go: The black line are gone. Now creating the code for all this is not quite as easy, but basically that's what you have to do
|
|
|
Re: SSAO
[Re: lostclimate]
#240404
12/10/08 20:03
12/10/08 20:03
|
Joined: Jun 2004
Posts: 655 to your left
BoH_Havoc
User
|
User
Joined: Jun 2004
Posts: 655
to your left
|
Ah sorry, i thought you were talking about this bug: As you are using 32bit rgba, you could try to encode your depthmap like this: encode (depthmap shader): float depth = Color.r; //this is the depth Color.r = floor(Color.r*127)/127; Color.g = floor((depth-Color.r)*127*127)/127; decode (ssao shader): float depth = tex2D(depthSampler,inTex).r + tex2D(depthSampler,inTex).g/127; This should drastically reduce the "rings". However ultimately you might want to use a 32bit floating point texture: bmap_to_format(depthTexture,14); and then only write/read from the red channel of your depthmap. Hope this helps
|
|
|
Re: SSAO
[Re: lostclimate]
#240472
12/11/08 05:23
12/11/08 05:23
|
Joined: Mar 2006
Posts: 3,538 WA, Australia
JibbSmart
Expert
|
Expert
Joined: Mar 2006
Posts: 3,538
WA, Australia
|
nice work!
i think foxfire solved that problem (is an area really being occluded or not?) using a few ray-traces, but i doubt that would be necessary.
julz
Formerly known as JulzMighty. I made KarBOOM!
|
|
|
|