Jump to content

  • Log In with Google      Sign In   
  • Create Account

14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!

#Actualgnomgrol

Posted 28 July 2012 - 06:54 AM

When I move the camera out, FPS remain the same.
The FPS are about the same on a single vertexBuffer-drawCall.
16-bit optimization could really help, but I dont have the slightest idea how to do that.

According to your blog, I have to find the size of my vertexBuffer and then pad it to 16,32 or 64, but how do I pad a vertexBuffer?
The size of each element of the vertexstructure (3x sizeof(float) * 2x sizeof(float).... + padding) = 32, eg?

#4gnomgrol

Posted 28 July 2012 - 06:53 AM

When I move the camera out, FPS remain the same.
16-bit optimization could really help, but I dont have the slightest idea how to do that.

According to your blog, I have to find the size of my vertexBuffer and then pad it to 16,32 or 64, but how do I pad a vertexBuffer?
The size of each element of the vertexstructure (3x sizeof(float) * 2x sizeof(float).... + padding) = 32, eg?

#3gnomgrol

Posted 28 July 2012 - 06:51 AM

When I move the camera out, FPS remain the same.
16-bit optimization could really help, but I dont have the slightest idea how to do that.

According to your blog, I have to find the size of my vertexBuffer and then pad it to 16,32 or 64, but how do I pad a vertexBuffer?

#2gnomgrol

Posted 28 July 2012 - 06:48 AM

When I move the camera out, FPS remain the same.
16-bit optimization could really help, but I dont have the slightest idea how to do that.

My vertexLayout looks like this:

layout[0].SemanticName = "POSITION";
layout[0].SemanticIndex = 0;
layout[0].Format = DXGI_FORMAT_R32G32B32_FLOAT;
layout[0].InputSlot = 0;
layout[0].AlignedByteOffset = 0;
layout[0].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
layout[0].InstanceDataStepRate = 0;
layout[1].SemanticName = "NORMAL";
layout[1].SemanticIndex = 0;
layout[1].Format = DXGI_FORMAT_R32G32B32_FLOAT;
layout[1].InputSlot = 0;
layout[1].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
layout[1].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
layout[1].InstanceDataStepRate = 0;
layout[2].SemanticName = "TEXCOORD";
layout[2].SemanticIndex = 0;
layout[2].Format = DXGI_FORMAT_R32G32_FLOAT;
layout[2].InputSlot = 0;
layout[2].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
layout[2].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
layout[2].InstanceDataStepRate = 0;
layout[3].SemanticName = "COLOR";
layout[3].SemanticIndex = 0;
layout[3].Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
layout[3].InputSlot = 0;
layout[3].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
layout[3].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
layout[3].InstanceDataStepRate = 0;
layout[4].SemanticName = "COLOR";
    layout[4].SemanticIndex = 1;
    layout[4].Format = DXGI_FORMAT_R32G32B32A32_FLOAT;
    layout[4].InputSlot = 0;
    layout[4].AlignedByteOffset = D3D11_APPEND_ALIGNED_ELEMENT;
    layout[4].InputSlotClass = D3D11_INPUT_PER_VERTEX_DATA;
    layout[4].InstanceDataStepRate = 0;
UINT numElements;
numElements = ARRAYSIZE(layout);

d3d11Device->CreateInputLayout( layout, numElements, VS_Buffer->GetBufferPointer(), VS_Buffer->GetBufferSize(), &vertLayout );

#1gnomgrol

Posted 28 July 2012 - 06:47 AM

When I move the camera out, FPS remain the same.
16-bit optimization could really help, but I dont have the slightest idea how to do that.

PARTNERS