Jump to content

  • Log In with Google      Sign In   
  • Create Account

REF_Cracker

Member Since 22 Feb 2000
Offline Last Active Jul 19 2016 08:52 PM

Posts I've Made

In Topic: Directional lighting trouble.

06 June 2016 - 03:52 PM

Looks like you're putting the light's POSITION into your constant buffer CPU side. This is correct for a point light. But in the case of a directional light you just need a DIRECTION!

(If you normalize the lights position as you're doing here you'll get a directional vector form the origin to the lights position as your directional light direction.)


In Topic: Directly access XMMATRIX ellements

25 February 2016 - 01:42 PM

LHLaurini:

1) The OP is asking why he's getting an error trying to access "members _11 _21 _31" etc. I have correctly answered why this is occurring. You have not.

2) While I do assume OP is using Visual Studio as we are dealing with the DirectX Math library here the advice of "going to the definition" of XMMATRIX is sound and teaches the OP how to get to the root of the problem.

3) I have not recommended disabling SIMD. But it appears to be the only way to access elements NAMED _11 _21 _31 if you need to do so for learning purposes.

 

4) There are additional ways to access the individual components of the matrix including the one you pointed out.
 


In Topic: Directly access XMMATRIX ellements

24 February 2016 - 04:59 PM

Hi there,

Seems like you need to get a little more familiar with C++ and your dev environment. I assume you're using Visual Studio... if so you can right click on any class name and select "goto definition"

If you do that for XMMATRIX it will bring you to this bit of code 

 

#ifdef _XM_NO_INTRINSICS_
    union
    {
        XMVECTOR r[4];
        struct
        {
            float _11, _12, _13, _14;
            float _21, _22, _23, _24;
            float _31, _32, _33, _34;
            float _41, _42, _43, _44;
        };
        float m[4][4];
    };
#else
    XMVECTOR r[4];
#endif

As you can see ... if _XM_NO_INTRINSICS_ is defined you have access to "float _11, _12, _13, _14;" etc via the union.
otherwise the data for the structure is defined as XMVECTOR r[4];


So the simple answer would be to define _XM_NO_INTRINSICS_ if you NEED access to those members for learning purposes. However I assume from the definition name that you will lose all SIMD optimizations!

Good luck!
 


In Topic: Temporally Smoothing SSAO ?

08 January 2016 - 06:16 PM

Hi,

I ran across this blog post today so I thought I'd link it here for you. It discusses temporal reprojection of SSAO.

http://bitsquid.blogspot.ca/2015/09/temporal-reprojection-and-sao.html


In Topic: Questions on Baked GI Spherical Harmonics

03 December 2015 - 11:57 AM

Just a quick semi answer whilst glancing over your question.....

Here's the GDC presentation by Robert Cupisz

http://gdcvault.com/play/1015312/Light-Probe-Interpolation-Using-Tetrahedral

And a link to his website he's reposted the slides and a video with some more info.
http://robert.cupisz.eu/post/75393800428/light-probe-interpolation

 


PARTNERS