home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 11288 / CryRyseImport.7z / include / CryMat_XML_headers_.ms < prev    next >
Encoding:
Text File  |  2016-07-12  |  9.7 KB  |  245 lines

  1. --see: C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.0\Code\CryEngine\CryCommon\IMaterial.h
  2. -- in Cryengine 5 source code
  3. -- //////////////////////////////////////////////////////////////////////////
  4. -- // Description:
  5. -- //    IMaterial is an interface to the material object, SShaderItem host which is a combination of IShader and SShaderInputResources.
  6. -- //    Material bind together rendering algorithm (Shader) and resources needed to render this shader, textures, colors, etc...
  7. -- //    All materials except for pure sub material childs have a unique name which directly represent .mtl file on disk.
  8. -- //    Ex: "Materials/Fire/Burn"
  9. -- //    Materials can be created by Sandbox MaterialEditor.
  10. -- //////////////////////////////////////////////////////////////////////////
  11.  
  12. struct EMaterialFlags
  13. (
  14.     MTL_FLAG_WIRE                                      = 0x0001,   --//!< Use wire frame rendering for this material.
  15.     MTL_FLAG_2SIDED                                    = 0x0002,   --//!< Use 2 Sided rendering for this material.
  16.     MTL_FLAG_ADDITIVE                                  = 0x0004,   --//!< Use Additive blending for this material.
  17.     MTL_FLAG_DETAIL_DECAL                          = 0x0008,   --//!< Massive decal technique.
  18.     MTL_FLAG_LIGHTING                                 = 0x0010,   --//!< Should lighting be applied on this material.
  19.     MTL_FLAG_NOSHADOW                              = 0x0020,   --//!< Material do not cast shadows.
  20.     MTL_FLAG_ALWAYS_USED                           = 0x0040,   --//!< When set forces material to be export even if not explicitly used.
  21.     MTL_FLAG_PURE_CHILD                                = 0x0080,   --//!< Not shared sub material, sub material unique to his parent multi material.
  22.     MTL_FLAG_MULTI_SUBMTL                          = 0x0100,   --//!< This material is a multi sub material.
  23.     MTL_FLAG_NOPHYSICALIZE                         = 0x0200,   --//!< Should not physicalize this material.
  24.     MTL_FLAG_NODRAW                                    = 0x0400,   --//!< Do not render this material.
  25.     MTL_FLAG_NOPREVIEW                             = 0x0800,   --//!< Cannot preview the material.
  26.     MTL_FLAG_NOTINSTANCED                          = 0x1000,   --//!< Do not instantiate this material.
  27.     MTL_FLAG_COLLISION_PROXY                       = 0x2000,   --//!< This material is the collision proxy.
  28.     MTL_FLAG_SCATTER                                   = 0x4000,   --//!< Use scattering for this material.
  29.     MTL_FLAG_REQUIRE_FORWARD_RENDERING     = 0x8000,   --//!< This material has to be rendered in foward rendering passes (alpha/additive blended).
  30.     MTL_FLAG_NON_REMOVABLE                         = 0x10000,  --//!< Material with this flag once created are never removed from material manager (Used for decal materials, this flag should not be saved).
  31.     MTL_FLAG_HIDEONBREAK                           = 0x20000,  --//!< Non-physicalized subsets with such materials will be removed after the object breaks.
  32.     MTL_FLAG_UIMATERIAL                                = 0x40000,  --//!< Used for UI in Editor. Don't need show it DB.
  33.     MTL_64BIT_SHADERGENMASK                        = 0x80000,  --//!< ShaderGen mask is remapped.
  34.     MTL_FLAG_RAYCAST_PROXY                         = 0x100000,
  35.     MTL_FLAG_REQUIRE_NEAREST_CUBEMAP       = 0x200000, --//!< Materials with alpha blending requires special processing for shadows.
  36.     MTL_FLAG_CONSOLE_MAT                           = 0x400000,
  37.     MTL_FLAG_DELETE_PENDING                        = 0x800000, --//!< Internal use only.
  38.     MTL_FLAG_BLEND_TERRAIN                         = 0x1000000
  39. )
  40. /*
  41. --Bitmasking
  42. For example, let's say we have MtlFlags = "525440"
  43. In HEX, this is 0x80480
  44. Which is the sum of the EMaterialFlags
  45. 0x80000 + 0x0400 + 0x0080 (see above)
  46.  
  47. MTL_64BIT_SHADERGENMASK            = 0x80000
  48. MTL_FLAG_NODRAW                            = 0x0400,   //!< Do not render this material.
  49. MTL_FLAG_PURE_CHILD                        = 0x0080,
  50. --*/
  51.  
  52. --///////////////////////////////////////////////////////////////////////////
  53. --see: C:\Program Files (x86)\Crytek\CRYENGINE Launcher\Crytek\CRYENGINE_5.0\Code\CryEngine\RenderDll\Common\Shaders\ShaderCore.cpp
  54. --see: ShaderParse.cpp 392, 491
  55. --see: Renderer.cpp 1469
  56. struct MaskGenFlags
  57. (
  58.     --// Store original values since common material flags where introduced
  59.     ALPHAGLOW                                 = #("0x2", "ALPHAGLOW" ),                                         --uint64
  60.     ALPHAMASK_DETAILMAP                 = #("0x4", "ALPHAMASK_DETAILMAP"     ),                        --uint64
  61.     ANISO_SPECULAR                         = #("0x8", "ANISO_SPECULAR" ),                                 --(uint64)
  62.  
  63.     BILINEAR_FP16                             = #("0x10", "BILINEAR_FP16" ),                                     --(uint64)
  64.     BUMP_DIFFUSE                             = #("0x20", "BUMP_DIFFUSE"),                                     --(uint64)
  65.     CHARACTER_DECAL                         = #("0x40", "CHARACTER_DECAL"),                             --(uint64)
  66.  
  67.     CUSTOM_SPECULAR                         = #("0x400", "CUSTOM_SPECULAR" ),                             --(uint64)
  68.     DECAL                                         = #("0x800", "DECAL" ),                                             --(uint64)
  69.  
  70.     DETAIL_BENDING                             = #("0x1000", "DETAIL_BENDING"),                             --(uint64)
  71.     DETAIL_BUMP_MAPPING                 = #("0x2000", "DETAIL_BUMP_MAPPING"),                     --(uint64)
  72.     DISABLE_RAIN_PASS                     = #("0x4000", "DISABLE_RAIN_PASS" ),                         --(uint64)
  73.  
  74.     ENVIRONMENT_MAP                         = #("0x10000", "ENVIRONMENT_MAP"),                         --(uint64)
  75.     EYE_OVERLAY                             = #("0x20000", "EYE_OVERLAY" ),                                 --(uint64)
  76.     GLOSS_DIFFUSEALPHA                     = #("0x40000", "GLOSS_DIFFUSEALPHA"),                    --(uint64)
  77.     GLOSS_MAP                                 = #("0x80000", "GLOSS_MAP" ),                                 --(uint64)
  78.  
  79.     GRADIENT_COLORING                     = #("0x100000", "GRADIENT_COLORING"),                     --(uint64)
  80.     GRASS                                         = #("0x200000", "GRASS"),                                         --(uint64)
  81.     IRIS                                             = #("0x400000", "IRIS"),                                             --(uint64)
  82.     LEAVES                                         = #("0x800000", "LEAVES"),                                         --(uint64)
  83.  
  84.     NANOSUIT_EFFECTS                     = #("0x1000000", "NANOSUIT_EFFECTS"),                     --(uint64)
  85.     OFFSET_BUMP_MAPPING                 = #("0x2000000", "OFFSET_BUMP_MAPPING"),                 --(uint64)
  86.     PARALLAX_OCCLUSION_MAPPING     = #("0x8000000", "PARALLAX_OCCLUSION_MAPPING"),     --(uint64)
  87.  
  88.     REALTIME_MIRROR_REFLECTION         = #("0x10000000", "REALTIME_MIRROR_REFLECTION"),     --(uint64)
  89.     REFRACTION_MAP                         = #("0x20000000", "REFRACTION_MAP"),                     --(uint64)
  90.     RIM_LIGHTING                             = #("0x40000000", "RIM_LIGHTING"),                             --(uint64)
  91.     SPECULARPOW_GLOSSALPHA             = #("0x80000000", "SPECULARPOW_GLOSSALPHA"),        --(uint64)
  92.  
  93.     TEMP_TERRAIN                             = #("0x200000000", "TEMP_TERRAIN" ),                         --(uint64) ULL
  94.     TEMP_VEGETATION                         = #("0x400000000", "TEMP_VEGETATION" ),                 --(uint64) ULL
  95.     TERRAINHEIGHTADAPTION             = #("0x800000000", "TERRAINHEIGHTADAPTION"),         --(uint64) ULL
  96.  
  97.     TWO_SIDED_SORTING                     = #("0x1000000000", "TWO_SIDED_SORTING" ),             --(uint64) ULL
  98.     VERTCOLORS                                 = #("0x2000000000", "VERTCOLORS"),                         --(uint64) ULL
  99.     WIND_BENDING                             = #("0x4000000000", "WIND_BENDING"),                         --(uint64) ULL
  100.     WRINKLE_BLENDING                         = #("0x8000000000", "WRINKLE_BLENDING")                 --(uint64) ULL
  101. )
  102.  
  103. ------CDF structs------
  104. struct CDF_Attribs
  105. (
  106.     nTagString         = "",
  107.     idx                = 0,
  108.     attribName         = #(),
  109.     attribVal         = #()    
  110. )
  111. --------------------------
  112.  
  113. struct CHRPARAMS_Attribs
  114. (
  115.     nodeID            = 0,
  116.     nTagString         = "",
  117.     attribName         = #(),
  118.     attribVal         = #()
  119. )
  120.  
  121. struct matParams
  122. (    
  123.     matIDX                                        = 0,
  124.     subM                                            = 0,
  125.     matNodeCounter                             = 0,
  126.     MaterialRef_node_counter                 = 0,
  127.     g_curr_MaterialRef_node_counter     = 0,
  128.     i                                                = 0
  129. )
  130.  
  131. struct materialAttribs
  132. (
  133.     _Name_                     = #(),
  134.     _Shader_                 = #(),
  135.                         
  136.     _MtlFlags_                 = #(),
  137.     _MtlFlags_arr             = #(),
  138.     
  139.     _GenMask_             = #(),
  140.     _GenMask_arr            = #(),
  141.                         
  142.     _StringGenMask_     = #(),
  143.     _SurfaceType_         = #(),
  144.     _MatTemplate_         = #(),
  145.     _Diffuse_                 = #(),
  146.     _Specular_             = #(),
  147.     _Emissive_                 = #(),
  148.     _Shininess_             = #(),
  149.     _Opacity_                 = #(),
  150.     _LayerAct_             = #()
  151. )
  152.  
  153. struct MaterialRefAttribs
  154. (
  155.     MaterialRef_node_counter                 = 0,
  156.     g_curr_MaterialRef_node_counter     = 0,
  157.     _NameRef_                                 = #()
  158. )
  159.  
  160. struct textureAttribs
  161. (
  162.     _Map_                                         = #(),
  163.     _File_                                         = #(),
  164.     
  165.     _TexType_                                 = #(),
  166.     _IsTileU_                                     = #(),
  167.     _IsTileV_                                    = #(),
  168.     g_curr_MaterialRef_node_counter     = 0
  169. )    
  170.  
  171. struct publicParamsAttribs
  172. (
  173.     _BlendFalloff_                 = #(),
  174.     _BlendLayer2Tiling_         = #(),
  175.     
  176.     _SSSIndex_                 = #(),
  177.     _BlendMaskTiling_         = #(),
  178.     _BlendFactor_                = #(),
  179.     
  180.     _BlendLayer2Specular_     = #(),
  181.     _IndirectColor_             = #()
  182. )
  183.  
  184. struct s_OPTIONS
  185. (
  186.     chk_dds = false,
  187.         chk_dds_string = ".dds"
  188. )    
  189.  
  190. struct xmlB_struct
  191. (
  192.     nodeDepth         =         0,
  193.     nTagString         =         "",
  194.     attribName         =         #(),
  195.     attribVal            =         #()
  196. )
  197.  
  198. struct _Node
  199. (
  200.     nTagStringOffset             = 0,      --uint32 --offset in CBinaryXmlData::pStringData
  201.         nTagString                    = "",
  202.     nContentStringOffset         = 0,       --uint32 --offset in CBinaryXmlData::pStringData
  203.     nAttributeCount                 = 0,        --uint16
  204.     nChildCount                     = 0,        --uint16
  205.     nParentIndex                     = 0,         --uint32(p?) -1 prob means root node    --NodeIndex          typedef uint32 NodeIndex;  // note: only uint32 or uint16 are supported
  206.     nFirstAttributeIndex             = 0,      --uint32(p?)                --NodeIndex         typedef uint32 NodeIndex;  // note: only uint32 or uint16 are supported
  207.     nFirstChildIndex                = 0,        --uint32(p?)                --NodeIndex         typedef uint32 NodeIndex;  // note: only uint32 or uint16 are supported
  208.         
  209.     Pad                                 = 1         --int32(p?) (1 readlong)    --Pad<sizeof(uint32) - sizeof(NodeIndex)> reserved_for_alignment; 
  210. )
  211.  
  212. struct Attribute
  213. (
  214.     nKeyStringOffset = 0,                --uint32 --offset in CBinaryXmlData::pStringData
  215.     nValueStringOffset = 0              --uint32 --offset in CBinaryXmlData::pStringData
  216. )
  217.  
  218. struct BinaryFileHeader
  219. (
  220.     szSignature                 = "",         --char [8]
  221.     nXMLSize                     = 0,         --uint32
  222.     nNodeTablePosition         = 0,         --uint32
  223.     nNodeCount                 = 0,        --uint32
  224.     nAttributeTablePosition = 0,         --uint32
  225.     nAttributeCount             = 0,         --uint32
  226.     nChildTablePosition         = 0,         --uint32
  227.     nChildCount                 = 0,         --uint32
  228.     nStringDataPosition         = 0,        --uint32
  229.     nStringDataSize            = 0         --uint32
  230. )
  231.  
  232. struct attrib_child_indices
  233. (
  234.     nFirstAttributeIndex         = 0,
  235.     nFirstChildIndex             = 0,
  236.     
  237.     nFirstAttribute_val         = "",
  238.     nFirstChild_val             = ""
  239. )
  240.  
  241. struct stored_SkeletonList_XML
  242. (
  243.     _Name     = #(),
  244.     _File        = #()
  245. )