From a4a41e72f2a5168a639d3d59f9572719824d689c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Thu, 18 May 2023 23:04:27 -0700 Subject: [PATCH] Updated docs. --- docs/tools.rst | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/docs/tools.rst b/docs/tools.rst index 9dc667a87..3a78c3a0c 100644 --- a/docs/tools.rst +++ b/docs/tools.rst @@ -136,6 +136,49 @@ Predefined Uniforms For more info, see the `shader helper macros `__. +Vertex Shader Attributes +~~~~~~~~~~~~~~~~~~~~~~~~ + +``$input`` tokens for vertex shader can be only following: + + ================ =================== + Attribute bgfx::Attrib::Enum + ================ =================== + a_position Position + a_normal Normal + a_tangent Tangent + a_bitangent Bitangent + a_color0 Color0 + a_color1 Color1 + a_color2 Color2 + a_color3 Color3 + a_indices Indices + a_weight Weight + a_texcoord0 TexCoord0 + a_texcoord1 TexCoord1 + a_texcoord2 TexCoord2 + a_texcoord3 TexCoord3 + a_texcoord4 TexCoord4 + a_texcoord5 TexCoord5 + a_texcoord6 TexCoord6 + a_texcoord7 TexCoord7 + ================ =================== + +In ``varying.def.sc``, instance buffer input must use ``i_dataN`` as identifier where ``N`` is the index +of the attribute in the buffer. Type must be ``vec4``, and the stride must be multiple of 16. +The semantic must be ``TEXCOORDN`` with a decreasing index starting from ``TEXCOORD7``. + +:: + + vec4 i_data0 : TEXCOORD7; + vec4 i_data1 : TEXCOORD6; + vec4 i_data2 : TEXCOORD5; + vec4 i_data3 : TEXCOORD4; + vec4 i_data4 : TEXCOORD3; + +Options +~~~~~~~ + Options: -h, --help Display this help and exit.