home *** CD-ROM | disk | FTP | other *** search
/ Xentax forum attachments archive / xentax.7z / 11223 / CryRyseImport_fix35.7z / include / CryMat_XML_headers_.ms < prev    next >
Encoding:
Text File  |  2016-06-30  |  9.5 KB  |  241 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.     i                        = 0
  127. )
  128.  
  129. struct materialAttribs
  130. (
  131.     _Name_                     = #(),
  132.     _Shader_                 = #(),
  133.                         
  134.     _MtlFlags_                 = #(),
  135.     _MtlFlags_arr             = #(),
  136.     
  137.     _GenMask_             = #(),
  138.     _GenMask_arr            = #(),
  139.                         
  140.     _StringGenMask_     = #(),
  141.     _SurfaceType_         = #(),
  142.     _MatTemplate_         = #(),
  143.     _Diffuse_                 = #(),
  144.     _Specular_             = #(),
  145.     _Emissive_                 = #(),
  146.     _Shininess_             = #(),
  147.     _Opacity_                 = #(),
  148.     _LayerAct_             = #()
  149. )
  150.  
  151. struct MaterialRefAttribs
  152. (
  153.     _NameRef_             = #()
  154. )
  155.  
  156. struct textureAttribs
  157. (
  158.     _Map_                 = #(),
  159.     _File_                 = #(),
  160.     
  161.     _TexType_         = #(),
  162.     _IsTileU_             = #(),
  163.     _IsTileV_            = #()                        
  164.  
  165. )    
  166.  
  167. struct publicParamsAttribs
  168. (
  169.     _BlendFalloff_                 = #(),
  170.     _BlendLayer2Tiling_         = #(),
  171.     
  172.     _SSSIndex_                 = #(),
  173.     _BlendMaskTiling_         = #(),
  174.     _BlendFactor_                = #(),
  175.     
  176.     _BlendLayer2Specular_     = #(),
  177.     _IndirectColor_             = #()
  178. )
  179.  
  180. struct s_OPTIONS
  181. (
  182.     chk_dds = false,
  183.         chk_dds_string = ".dds"
  184. )    
  185.  
  186. struct xmlB_struct
  187. (
  188.     nodeDepth         =         0,
  189.     nTagString         =         "",
  190.     attribName         =         #(),
  191.     attribVal            =         #()
  192. )
  193.  
  194. struct _Node
  195. (
  196.     nTagStringOffset             = 0,      --uint32 --offset in CBinaryXmlData::pStringData
  197.         nTagString                    = "",
  198.     nContentStringOffset         = 0,       --uint32 --offset in CBinaryXmlData::pStringData
  199.     nAttributeCount                 = 0,        --uint16
  200.     nChildCount                     = 0,        --uint16
  201.     nParentIndex                     = 0,         --uint32(p?) -1 prob means root node    --NodeIndex          typedef uint32 NodeIndex;  // note: only uint32 or uint16 are supported
  202.     nFirstAttributeIndex             = 0,      --uint32(p?)                --NodeIndex         typedef uint32 NodeIndex;  // note: only uint32 or uint16 are supported
  203.     nFirstChildIndex                = 0,        --uint32(p?)                --NodeIndex         typedef uint32 NodeIndex;  // note: only uint32 or uint16 are supported
  204.         
  205.     Pad                                 = 1         --int32(p?) (1 readlong)    --Pad<sizeof(uint32) - sizeof(NodeIndex)> reserved_for_alignment; 
  206. )
  207.  
  208. struct Attribute
  209. (
  210.     nKeyStringOffset = 0,                --uint32 --offset in CBinaryXmlData::pStringData
  211.     nValueStringOffset = 0              --uint32 --offset in CBinaryXmlData::pStringData
  212. )
  213.  
  214. struct BinaryFileHeader
  215. (
  216.     szSignature                 = "",         --char [8]
  217.     nXMLSize                     = 0,         --uint32
  218.     nNodeTablePosition         = 0,         --uint32
  219.     nNodeCount                 = 0,        --uint32
  220.     nAttributeTablePosition = 0,         --uint32
  221.     nAttributeCount             = 0,         --uint32
  222.     nChildTablePosition         = 0,         --uint32
  223.     nChildCount                 = 0,         --uint32
  224.     nStringDataPosition         = 0,        --uint32
  225.     nStringDataSize            = 0         --uint32
  226. )
  227.  
  228. struct attrib_child_indices
  229. (
  230.     nFirstAttributeIndex         = 0,
  231.     nFirstChildIndex             = 0,
  232.     
  233.     nFirstAttribute_val         = "",
  234.     nFirstChild_val             = ""
  235. )
  236.  
  237. struct stored_SkeletonList_XML
  238. (
  239.     _Name     = #(),
  240.     _File        = #()
  241. )