Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


#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