Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualeppo

Posted 16 November 2012 - 02:59 AM

The bytes offsets you've supplied specify the offsets in the vertex buffer. They have nothing to do with vertex shader input registers (these are all 4 * 4 bytes floats). For example, the format DXGI_FORMAT_R8_UNORM is stored as an 8 bits integer, but expands to a 32 bits float when written into a VS register. So, as there is no direct relation between byte sizes, the IA uses semantics to couple values.

If the vertex shader expects the fourth element to have a semantic 'Weights', then the input layout should have an identical fourth element. So in this case you need to throw the Tangent semantic out of the input layout and create a separate layout for the normal mapped case.

#3eppo

Posted 16 November 2012 - 02:59 AM

The bytes offsets you've supplied specify the offsets in the vertex buffer. They have nothing to do with vertex shader input registers (these are all 4 * 4 bytes floats). For example, the format DXGI_FORMAT_R8_UNORM is stored as an 8 bits integer, but expands to a 32 bits float when written into a VS register. So, as there is no direct relation between byte sizes, the IA uses semantics to couple values.

If the vertex shader expects the fourth element to have a semantic 'Weights', then the input layout should have an identical fourth element. So in this case you need to throw the Tangent semantic out of the input layout and create a separate layout for the normal mapped case.

#2eppo

Posted 16 November 2012 - 02:59 AM

The bytes offsets you've supplied specify the offsets in the vertex buffer. They have nothing to do with vertex shader input registers (these are all 4 * 4 bytes floats). For example, the format DXGI_FORMAT_R8_UNORM is stored as an 8 bits integer, but expands to a 32 bits float when written into a VS register. So, as there is no direct relation between byte sizes, the IA uses semantics to couple values.

If the vertex shader expects the fourth element to have a semantic 'Weights', then the input layout should have an identical fourth element. So in this case you need to throw the Tangent semantic out of the input layout and create a separate layout for the normal mapped case.

#1eppo

Posted 15 November 2012 - 01:44 PM

The bytes offsets you've supplied specify the offsets in the vertex buffer. They have nothing to do with vertex shader input registers (these are all 4 * 4 bytes floats).

If the vertex shader expects the fourth element to have a semantic 'Weights', then the input layout should have an identical fourth element. So in this case you need to throw the Tangent semantic out of the input layout and create a separate layout for the normal mapped case.

PARTNERS