Jump to content

  • Log In with Google      Sign In   
  • Create Account


error with fragment's structure in HLSL?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 steven166   Members   -  Reputation: 234

Like
0Likes
Like

Posted 25 June 2012 - 05:01 AM

I am modifying the OIT, per-pixel linked list algorithm in DX11, http://www.yakiimo3d...ency-with-msaa/. The original fragment's structure is

struct FragmentData
{
		unsigned int nColor;				// Pixel color
unsigned int nDepthAndCoverage;
};
struct FragmentLink
{
		FragmentData fragmentData;	// Fragment data
		unsigned int nNext;			// Link to next fragment
};


And now I need to add some information into this structure, for instance:

struct FragmentData
{
		unsigned int nColor;				// Pixel color
		unsigned int nDepthAndCoverage;
		float2 PrimitiveID;
};
struct FragmentLink
{
	FragmentData fragmentData;	// Fragment data
	unsigned int nNext;			// Link to next fragment
};

This algorithm has two phases, the first one is create a linked list, and the other one is sort and render. I got a black screen and my monitor is turned off and on many times as I am running this project, the first phase always have no error, but I replace float2 PrimitiveID into float PrimitiveID, then everything is okay. Anybody knows the reason, please help me? because I need to add some other information.

Edited by steven166, 25 June 2012 - 05:03 AM.


Sponsor:

#2 steven166   Members   -  Reputation: 234

Like
0Likes
Like

Posted 25 June 2012 - 05:18 AM

I got the solution, I forgot to modify the fragment's structure in cpp file




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS