51 const uint64_t geometry_mask = ((1u << 3u) - 1u);
52 const uint64_t pipeline_mask = ((1u << 3u) - 1u);
54 pipeline_type =
static_cast<eMaterialPipeline>((shader_uuid >> 3u) & pipeline_mask);
60 return geometry_type | (pipeline_type << 3);
67 eClosureBits closure_bits = eClosureBits(0);
69 closure_bits |= CLOSURE_DIFFUSE;
72 closure_bits |= CLOSURE_TRANSPARENCY;
75 closure_bits |= CLOSURE_EMISSION;
78 closure_bits |= CLOSURE_REFLECTION;
81 closure_bits |= CLOSURE_SSS;
84 closure_bits |= CLOSURE_REFRACTION;
87 closure_bits |= CLOSURE_HOLDOUT;
90 closure_bits |= CLOSURE_AMBIENT_OCCLUSION;
#define ENUM_OPERATORS(_type, _max)
struct GPUShader * GPU_material_get_shader(GPUMaterial *material)
bool GPU_material_flag_get(const GPUMaterial *mat, eGPUMaterialFlag flag)
@ GPU_MATFLAG_TRANSPARENT
struct GPUShader GPUShader
bNodeTree * nodetree_get(::Material *ma)
~DefaultSurfaceNodeTree()
A running instance of the engine.
MaterialModule(Instance &inst)
Material & material_get(Object *ob, bool has_motion, int mat_nr, eMaterialGeometry geometry_type)
MaterialArray & material_array_get(Object *ob, bool has_motion)
int64_t queued_shaders_count
static void material_type_from_shader_uuid(uint64_t shader_uuid, eMaterialPipeline &pipeline_type, eMaterialGeometry &geometry_type)
static uint64_t shader_uuid_from_material_type(eMaterialPipeline pipeline_type, eMaterialGeometry geometry_type)
static eMaterialGeometry to_material_geometry(const Object *ob)
static eClosureBits shader_closure_bits_from_flag(const GPUMaterial *gpumat)
@ MAT_PIPE_DEFERRED_PREPASS_VELOCITY
@ MAT_PIPE_FORWARD_PREPASS_VELOCITY
@ MAT_PIPE_DEFERRED_PREPASS
@ MAT_PIPE_FORWARD_PREPASS
unsigned __int64 uint64_t
Vector< Material * > materials
Vector< GPUMaterial * > gpu_materials
MaterialKey(::Material *mat_, eMaterialGeometry geometry, eMaterialPipeline surface_pipeline)
bool operator<(const MaterialKey &k) const
bool operator==(const MaterialKey &k) const
bool is_alpha_blend_transparent
bool operator<(const ShaderKey &k) const
ShaderKey(GPUMaterial *gpumat, eMaterialGeometry geometry, eMaterialPipeline pipeline)
bool operator==(const ShaderKey &k) const