Sorting a bucket

Started by
9 comments, last by cozzie 9 years, 8 months ago

Got it solved, appearantly I wasn't setting the bits right, here's the solution:


		//makeKey = ((0xFF & tr.MatGroup) << 40)	| ((0xFF & tr.Material) << 32)	| ((0xFF & tr.Mesh) << 24)			| ((0xFF & tr.Instance) << 8)		| (0xFF & tr.DistToCamConv);
		makeKey |= (UINT64)tr.MatGroup	<< 40;
		makeKey |= (UINT64)tr.Material	<< 32;
		makeKey |= (UINT64)tr.Mesh		<< 24;
		makeKey |= (UINT64)tr.DistToCamConv << 16;
		makeKey |= (UINT64)tr.Instance;

Crealysm game & engine development: http://www.crealysm.com

Looking for a passionate, disciplined and structured producer? PM me

This topic is closed to new replies.

Advertisement