diff --git a/Content/Editor/MaterialTemplates/Surface.shader b/Content/Editor/MaterialTemplates/Surface.shader index fd6cb31fa..1c142f463 100644 --- a/Content/Editor/MaterialTemplates/Surface.shader +++ b/Content/Editor/MaterialTemplates/Surface.shader @@ -459,7 +459,7 @@ META_VS_IN_ELEMENT(TEXCOORD, 0, R16G16_FLOAT, 0, ALIGN, PER_VERTEX, 0, META_VS_IN_ELEMENT(NORMAL, 0, R10G10B10A2_UNORM, 0, ALIGN, PER_VERTEX, 0, true) META_VS_IN_ELEMENT(TANGENT, 0, R10G10B10A2_UNORM, 0, ALIGN, PER_VERTEX, 0, true) META_VS_IN_ELEMENT(BLENDINDICES, 0, R8G8B8A8_UINT, 0, ALIGN, PER_VERTEX, 0, true) -META_VS_IN_ELEMENT(BLENDWEIGHT, 0, R16G16B16A16_FLOAT,0, ALIGN, PER_VERTEX, 0, true) +META_VS_IN_ELEMENT(BLENDWEIGHTS, 0, R16G16B16A16_FLOAT,0, ALIGN, PER_VERTEX, 0, true) VertexOutput VS_Skinned(ModelInput_Skinned input) { VertexOutput output; diff --git a/Source/Engine/Graphics/Shaders/VertexElement.h b/Source/Engine/Graphics/Shaders/VertexElement.h index 4bc628fcc..3744c2f6a 100644 --- a/Source/Engine/Graphics/Shaders/VertexElement.h +++ b/Source/Engine/Graphics/Shaders/VertexElement.h @@ -19,45 +19,45 @@ PACK_BEGIN() struct FLAXENGINE_API VertexElement { // Undefined. Unknown = 0, - // Vertex position. + // Vertex position. Maps to 'POSITION' semantic in the shader. Position = 1, - // Vertex color. + // Vertex color. Maps to 'COLOR' semantic in the shader. Color = 2, - // Vertex normal vector. + // Vertex normal vector. Maps to 'NORMAL' semantic in the shader. Normal = 3, - // Vertex tangent vector. + // Vertex tangent vector. Maps to 'TANGENT' semantic in the shader. Tangent = 4, - // Skinned bone blend indices. + // Skinned bone blend indices. Maps to 'BLENDINDICES' semantic in the shader. BlendIndices = 5, - // Skinned bone blend weights. + // Skinned bone blend weights. Maps to 'BLENDWEIGHTS' semantic in the shader. BlendWeights = 6, - // Primary texture coordinate (UV). + // Primary texture coordinate (UV). Maps to 'TEXCOORD0' semantic in the shader. TexCoord0 = 7, - // Additional texture coordinate (UV1). + // Additional texture coordinate (UV1). Maps to 'TEXCOORD1' semantic in the shader. TexCoord1 = 8, - // Additional texture coordinate (UV2). + // Additional texture coordinate (UV2). Maps to 'TEXCOORD2' semantic in the shader. TexCoord2 = 9, - // Additional texture coordinate (UV3). + // Additional texture coordinate (UV3). Maps to 'TEXCOORD3' semantic in the shader. TexCoord3 = 10, - // Additional texture coordinate (UV4). + // Additional texture coordinate (UV4). Maps to 'TEXCOORD4' semantic in the shader. TexCoord4 = 11, - // Additional texture coordinate (UV5). + // Additional texture coordinate (UV5). Maps to 'TEXCOORD5' semantic in the shader. TexCoord5 = 12, - // Additional texture coordinate (UV6). + // Additional texture coordinate (UV6). Maps to 'TEXCOORD6' semantic in the shader. TexCoord6 = 13, - // Additional texture coordinate (UV7). + // Additional texture coordinate (UV7). Maps to 'TEXCOORD7' semantic in the shader. TexCoord7 = 14, - // General purpose attribute (at index 0). + // General purpose attribute (at index 0). Maps to 'ATTRIBUTE0' semantic in the shader. Attribute0 = 15, - // General purpose attribute (at index 1). + // General purpose attribute (at index 1). Maps to 'ATTRIBUTE1' semantic in the shader. Attribute1 = 16, - // General purpose attribute (at index 2). + // General purpose attribute (at index 2). Maps to 'ATTRIBUTE2' semantic in the shader. Attribute2 = 17, - // General purpose attribute (at index 3). + // General purpose attribute (at index 3). Maps to 'ATTRIBUTE3' semantic in the shader. Attribute3 = 18, - // Texture coordinate. + // Texture coordinate. Maps to 'TEXCOORD' semantic in the shader. TexCoord = TexCoord0, - // General purpose attribute. + // General purpose attribute. Maps to 'ATTRIBUTE0' semantic in the shader. Attribute = Attribute0, MAX }; diff --git a/Source/Engine/GraphicsDevice/DirectX/RenderToolsDX.cpp b/Source/Engine/GraphicsDevice/DirectX/RenderToolsDX.cpp index 550ac5b87..94e2513d5 100644 --- a/Source/Engine/GraphicsDevice/DirectX/RenderToolsDX.cpp +++ b/Source/Engine/GraphicsDevice/DirectX/RenderToolsDX.cpp @@ -290,7 +290,7 @@ LPCSTR RenderToolsDX::GetVertexInputSemantic(VertexElement::Types type, UINT& se case VertexElement::Types::BlendIndices: return "BLENDINDICES"; case VertexElement::Types::BlendWeights: - return "BLENDWEIGHT"; + return "BLENDWEIGHTS"; case VertexElement::Types::TexCoord0: return "TEXCOORD"; case VertexElement::Types::TexCoord1: diff --git a/Source/Engine/ShadersCompilation/Parser/ShaderMeta.h b/Source/Engine/ShadersCompilation/Parser/ShaderMeta.h index a8c45d0eb..796206622 100644 --- a/Source/Engine/ShadersCompilation/Parser/ShaderMeta.h +++ b/Source/Engine/ShadersCompilation/Parser/ShaderMeta.h @@ -141,7 +141,9 @@ public: BITANGENT = 6, ATTRIBUTE = 7, BLENDINDICES = 8, - BLENDWEIGHT = 9, + BLENDWEIGHTS = 9, + // [Deprecated in v1.10] + BLENDWEIGHT = BLENDWEIGHTS, }; /// diff --git a/Source/Engine/ShadersCompilation/Parser/ShaderProcessing.Parse.cpp b/Source/Engine/ShadersCompilation/Parser/ShaderProcessing.Parse.cpp index da5f373b3..ad7a73743 100644 --- a/Source/Engine/ShadersCompilation/Parser/ShaderProcessing.Parse.cpp +++ b/Source/Engine/ShadersCompilation/Parser/ShaderProcessing.Parse.cpp @@ -26,7 +26,8 @@ VertexShaderMeta::InputType ShaderProcessing::ParseInputType(const Token& token) _PARSE_ENTRY(BITANGENT), _PARSE_ENTRY(ATTRIBUTE), _PARSE_ENTRY(BLENDINDICES), - _PARSE_ENTRY(BLENDWEIGHT), + _PARSE_ENTRY(BLENDWEIGHTS), + _PARSE_ENTRY(BLENDWEIGHT), // [Deprecated in v1.10] }; #undef _PARSE_ENTRY