Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 01 Feb 2013
Offline Last Active Jul 29 2016 01:10 AM

#5244806 Verify my GGX + Lambert Directional light

Posted by on 06 August 2015 - 07:01 AM

Thank you very much Spiro, you are such a helpful person. Don't know how you can reply to all those threads while still have your own work.

Anyway this is much appreciated and I think you deserved a real thank you here.


You just replied to all my interrogations right now so, I'm going to give it another go very soon.

#5227250 True object billboarding problem

Posted by on 05 May 2015 - 01:29 AM

Ok, for those who were following this ticket, this is dead simple. I guess I needed a good night...


To find the point E, I was projecting in screen space j2-j1 * radius. This is of course projecting the real 3d position.

What we need to do here is to find the projected radius length which is on the plane of the camera so: j1 + camUp * radius;

Project that result and then just do (projJ1Pos - projRadius).len() = projRadiusLength;


Then from here of course you can find E = projJ1Pos + (projJ2Pos - projJ1Pos).normalize() * projRadiusLength.


As mention in previous post, this is in screen space so we divide x and y by screen width and height, put everything in the range -1..1 and we are done.

In the shader no need for view nor pojection transform, just modelToWorld transform.


#5102343 D3DFMT_R16F format and D3DXFLOAT16

Posted by on 18 October 2013 - 03:24 AM

Found my stupid mistake finally...

Just had to specify D3DX_DEFAULT_NONPOW2 when loading the texture ! Damn default parameters...

Post could be deleted I guess.