• Content count

  • Joined

  • Last visited

Community Reputation

124 Neutral

About randall68000

  • Rank
  1. I was just checking your znear wasn't zero - a common gotcha.
  2. What is your projection matrix?
  3. DX11 DXGI vertex buffer format problem

    MJP - I have just changed the shaders to use int4's and I am getting the correct positions through now.   Thanks for pointing that out!
  4. DX11 DXGI vertex buffer format problem

    Kauna   I build a vertex description using a series of vertex flags like this (BuildVertexElement just fills in an array of D3D11_INPUT_ELEMENT_DESC)   if(params.mTypeMask&VertexBufferParams::kTypeXYZ32) { BuildVertexElement(vertexElements,element,"POSITION",0,DXGI_FORMAT_R32G32B32_FLOAT,0,offset,D3D11_INPUT_PER_VERTEX_DATA,0); offset+=12; }   if(params.mTypeMask&VertexBufferParams::kTypeXYZRHW16) { BuildVertexElement(vertexElements,element,"POSITIONT",0,DXGI_FORMAT_R16G16B16A16_UINT,0,offset,D3D11_INPUT_PER_VERTEX_DATA,0); offset+=8; }   And I use this to create the input layout (you are right CreateBuffer doesn't expect a format - this is my mistake).   MJP   I support Short4 positions in my DX9 code - I would like to support them in DX11 hence using DXGI_FORMAT_R16G16B16A16_SINT/UINT. Ah well there's the rub - I've got problems with the debug layers dll on my machines for some reason and I can't create the device in debug mode. I haven't got round to fixing the issue yet.   Cheers guys.
  5. Hi,   I have a problem with a vertex format in my DX11 engine. If I create a vertex buffer using the formats DXGI_FORMAT_R16G16B16A16_UINT or DXGI_FORMAT_R16G16B16A16_SINT for position (DX9 is SHORT4) I get zero for every component in the position passed into the shader (other componets are fine R8G8B8A8 colour and R16G16_SNORM for uv). I have ran pix and checked the inputs to the mesh on the Draw() command and confirmed they are all zero. If I pass in UNORM, SNORM or FLOAT I get reasonable data passed in for the position.   Is there any steps I have missed? ie. I don't create a ShaderResourceView but that doesn't seem to matter if I don't use the 16bit formats.   Thanks   Randall68000