Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualeppo

Posted 24 April 2013 - 06:48 AM

You have to offset back-facing faces before transforming them into view space, so you'll need to do the both the view and projection multiplications in the GS.

 

Make sure the vertex shader only transforms vertices into world space: out.pos = mul(in.pos, matrixW).xyz;

 

Your geometry shader will have to do something similar to: out.pos = mul(float4(in.pos.xyz + lightExtrudeVector,1.0), matrixVP);


#2eppo

Posted 24 April 2013 - 06:46 AM

You have to offset back-facing faces before transforming them into view space, so you'll need to do the both the view and projection multiplications in the GS.

 

Make sure the vertex shader only transforms vertices into world space and skips the depth divide: out.pos = float4(mul(in.pos, matrixW).xyz, 1.0);

 

Your geometry shader will have to do something similar to: out.pos = mul(float4(in.pos + lightExtrudeVector,1.0), matrixVP);


#1eppo

Posted 24 April 2013 - 06:45 AM

You have to offset back-facing faces before transforming them into view space, so you'll need to do the both the view and projection multiplications in the GS.

 

Make sure the vertex shader only transforms vertices into world space and skips the depth divide: out.pos = float4(mul(in.pos, matrixW), 1.0);

 

Your geometry shader will have to do something similar to: out.pos = mul(float4(in.pos + lightExtrudeVector,1.0), matrixVP);


PARTNERS