Jump to content

  • Log In with Google      Sign In   
  • Create Account


barsiwek

Member Since 05 Nov 2011
Offline Last Active Jan 11 2013 02:46 AM

Topics I've Started

XNAMath and double's in the constant buffer

10 January 2013 - 04:48 AM

Hi everyone,

 

XNAMath has a lot of useful structures for loading data into the mapped constant buffers. Like casting the appropriate piece of memory the XMFLOAT4A* and then assigning to it does the job. What I cannot find is the data structures that allow me to do the same for double4, double4x4 and similar entries in constant buffers. What is the best way to do that?


HLSL Vertex Shader input types and their alignment

24 November 2012 - 08:19 PM

Hi everyone,

I'm having no luck locating the following information on MSDN (or anywhere in that matter) and I was hoping that someone could help me.

First of all - is there somewhere a specification of what HLSL types are allowed as inputs to vertex shader (a.k.a. vertex attributes)?
Secondly - is there a specification how the above types are suppose to be aligned in the memory on the application side, so that everything works out?

Packing DXGI_FORMAT_R11G11B10_FLOAT

14 October 2012 - 06:23 AM

Hi everyone,

I would like to ask how to properly pack values of a vertex normal using DXGI_FORMAT_R11G11B10_FLOAT format.
My input, per vertex, is a 3 dimensional vector with components in range [-1,1] stored in 32bit floats. I do know that I have to scale that into the [0, 1] range since there is no signs in R11G11B10 format, but what am I suppose to do after? I can extract the exponent and mantisa but is truncating them bitwise the right way to go?

PARTNERS