46 lines
935 B
C
46 lines
935 B
C
|
#ifndef HGL_GRAPH_MATERIAL_VERTEX_FORMAT_INCLUDE
|
|||
|
#define HGL_GRAPH_MATERIAL_VERTEX_FORMAT_INCLUDE
|
|||
|
|
|||
|
#include<hgl/type/DataType.h>
|
|||
|
|
|||
|
namespace hgl
|
|||
|
{
|
|||
|
namespace graph
|
|||
|
{
|
|||
|
/**
|
|||
|
* Local 2 World <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ŷ<EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*
|
|||
|
* 1.Push Constants <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
*
|
|||
|
* 2.UBO <EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>matrix4f<EFBFBD><EFBFBD><EFBFBD>У<EFBFBD>vertex attrib<EFBFBD>д<EFBFBD><EFBFBD><EFBFBD>ID
|
|||
|
* UBOͨ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ16k/64k<EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD>matrix4fΪ64<EFBFBD>ֽڡ<EFBFBD>
|
|||
|
*
|
|||
|
* 3.Vertex Attribute
|
|||
|
*/
|
|||
|
|
|||
|
|
|||
|
/**
|
|||
|
* <EFBFBD><EFBFBD><EFBFBD>ʶ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ṹ
|
|||
|
*/
|
|||
|
union MaterialVertexFormat
|
|||
|
{
|
|||
|
struct
|
|||
|
{
|
|||
|
uint position:3;
|
|||
|
bool normal:1;
|
|||
|
bool tangent:1;
|
|||
|
bool bitangent:1;
|
|||
|
uint color:4;
|
|||
|
uint texcoord:4;
|
|||
|
|
|||
|
bool local2world:1;
|
|||
|
bool skeleton:1;
|
|||
|
};
|
|||
|
|
|||
|
uint32 format;
|
|||
|
};//union MaterialVertexFormat
|
|||
|
|
|||
|
|
|||
|
}//namespace graph
|
|||
|
}//namespace hgl
|
|||
|
#endif//HGL_GRAPH_MATERIAL_VERTEX_FORMAT_INCLUDE
|