• Create Account

### #ActualNyssa

Posted 14 February 2013 - 05:08 AM

Ok just looking over your code compared to that in the slides... Why are you doing the following, I don't see it in the example code from the slides?

ddx1 = -ddx2 + ddx1;

And in regards to the following and what you asked earlier:

+ float2(texelSize, 0)

What this code does is sample neighbouring texels. So if you have a non-square texture then replace float2(texelSize, 0) with float2(1.0 / texSizeX, 0) and replace float2(0, texelSize) with float2(0, 1.0 / texSizeY).

I'd also check your depth format. Check you're using a 32bit floating point target as 16bit may not be enough.

I also assume you are calculating posEye as follows (cause it's not defined in your original post)

float3 posEye = uvToEye(texCoord, depth);

### #1Nyssa

Posted 14 February 2013 - 05:01 AM

Ok just looking over your code compared to that in the slides... Why are you doing the following, I don't see it in the example code from the slides?

ddx1 = -ddx2 + ddx1;

And in regards to the following and what you asked earlier:

+ float2(texelSize, 0)

What this code does is sample neighbouring texels. So if you have a non-square texture then replace float2(texelSize, 0) with float2(1.0 / texSizeX, 0) and replace float2(0, texelSize) with float2(0, 1.0 / texSizeY).

I'd also check your depth format. Check you're using a 32bit floating point target as 16bit may not be enough.

PARTNERS