Jump to content

  • Log In with Google      Sign In   
  • Create Account

#Actuallipsryme

Posted 28 March 2013 - 07:05 AM

I saw this part from the battlefield3 presentation (http://dice.se/wp-content/uploads/GDC11_DX11inBF3_Public.pdf) on page 30 where they show how they transfer transformations of each instance to the shader using a single big buffer and a const buffer with indices to index this buffer at the right position using the SV_InstanceID semantic. Can someone tell me what exactly this buffer is ? 

This part here: 

Buffer<float4> instanceVectorBuffer : register(t0);

 

I'm not too familiar with buffers in directx11 beyond constant buffers...

Isn't register(t0) for texture slots ?  Also they seem to use 3x4 floats for their transformations, so does that mean they construct their transformation matrix inside the shader using translation, rotation and scale vectors ?

And last how would I set such a buffer in the DX11 API ?


#2lipsryme

Posted 28 March 2013 - 06:51 AM

I saw this part from the battlefield3 presentation (http://dice.se/wp-content/uploads/GDC11_DX11inBF3_Public.pdf) on page 30 where they show how they transfer transformations of each instance to the shader using a single big buffer and a const buffer with indices to index this buffer at the right position using the SV_InstanceID semantic. Can someone tell me what exactly this buffer is ? 

This part here: 

Buffer<float4> instanceVectorBuffer : register(t0);

 

Is that a tbuffer or something ? I'm not too familiar with buffers in directx11 beyond constant buffers...

And isn't register(t0) for texture slots ?  Also they seem to use 3x4 floats for their transformations, so does that mean they construct their transformation matrix inside the shader using translation, rotation and scale vectors ?

And last wouldn't this buffer be limited by the shader to something like 4096 ?


#1lipsryme

Posted 28 March 2013 - 06:51 AM

I saw this part from the battlefield3 presentation (http://dice.se/wp-content/uploads/GDC11_DX11inBF3_Public.pdf) on page 30 where they show how they transfer transformations of each instance to the shader using a single big buffer and a const buffer with indices to index this buffer at the right position using the SV_InstanceID semantic. Can someone tell me what exactly this buffer is ? 

This part here: 

Buffer<float4> instanceVectorBuffer : register(t0);

 

Is that a tbuffer or something ? I'm not too familiar with buffers in directx11 beyond constant buffers...

And isn't register(t0) for texture slots ?  Also they seem to use 3x4 floats for their transformations, so does that mean they construct their transformation matrix inside the shader using translation, rotation and scale vectors ?

And last wouldn't this buffer be limited by the shader to something like 4096 ?


PARTNERS