Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualTheResolute

Posted 08 February 2013 - 03:54 PM

I am using a constant buffer to transfer data to my pixel shader

The problem is that the buffer contains 0s in the shader during runtime for x, y, z, and w of the float4 member, regardless of what data is updated to the buffer

Structure definitions are as follows:

 

// (C++)
struct Buffer
{
    XMMATRIX mvp_;
    XMFLOAT4 rgba_;
    int usemvp_;
};


// HLSL
cbuffer Buffer : register( b0 )
{
    matrix mvp_;
    float4 rgba_;
    int usemvp_;
};
 

 

 Any help is much appreciated


#1TheResolute

Posted 08 February 2013 - 03:53 PM

I am using a constant buffer to transfer data to my pixel shader

The problem is that the buffer contains 0s in the shader during runtime for x, y, z, and w of the float4 member, regardless of what data is updated to the buffer

Structure definitions are as follows:

 

// (C++)
struct Buffer
{
    XMMATRIX mvp_;
    float4 rgba_;
    int usemvp_;
};


// HLSL
cbuffer Buffer : register( b0 )
{
    matrix mvp_;
    float4 rgba_;
    int usemvp_;
};
 

 

 Any help is much appreciated


PARTNERS