69 switch (displacement_method) {
88 switch (thickness_mode) {
107 bool &transparent_shadows)
109 const uint64_t geometry_mask = ((1u << 4u) - 1u);
110 const uint64_t pipeline_mask = ((1u << 4u) - 1u);
111 const uint64_t thickness_mask = ((1u << 1u) - 1u);
112 const uint64_t displacement_mask = ((1u << 1u) - 1u);
114 pipeline_type =
static_cast<eMaterialPipeline>((shader_uuid >> 4u) & pipeline_mask);
116 thickness_type =
static_cast<eMaterialThickness>((shader_uuid >> 9u) & thickness_mask);
117 transparent_shadows = (shader_uuid >> 10u) & 1u;
125 char blend_flags = 0)
134 uuid = geometry_type;
135 uuid |= pipeline_type << 4;
136 uuid |= displacement_type << 8;
137 uuid |= thickness_type << 9;
138 uuid |= transparent_shadows << 10;
210 short visibility_flags)
#define ENUM_OPERATORS(_type, _max)
@ MA_BL_TRANSPARENT_SHADOW
@ MA_DISPLACEMENT_DISPLACE
GPUShader * GPU_material_get_shader(GPUMaterial *material)
bool GPU_material_flag_get(const GPUMaterial *mat, eGPUMaterialFlag flag)
@ GPU_MATFLAG_SHADER_TO_RGBA
@ GPU_MATFLAG_TRANSLUCENT
@ 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)
::Material * metallic_mat
MaterialArray & material_array_get(Object *ob, bool has_motion)
int64_t queued_optimize_shaders_count
int64_t queued_shaders_count
static eMaterialDisplacement to_displacement_type(int displacement_method)
static bool geometry_type_has_surface(eMaterialGeometry geometry_type)
@ CLOSURE_AMBIENT_OCCLUSION
static eMaterialGeometry to_material_geometry(const Object *ob)
static eClosureBits shader_closure_bits_from_flag(const GPUMaterial *gpumat)
static void material_type_from_shader_uuid(uint64_t shader_uuid, eMaterialPipeline &pipeline_type, eMaterialGeometry &geometry_type, eMaterialDisplacement &displacement_type, eMaterialThickness &thickness_type, bool &transparent_shadows)
static uint64_t shader_uuid_from_material_type(eMaterialPipeline pipeline_type, eMaterialGeometry geometry_type, eMaterialDisplacement displacement_type=MAT_DISPLACEMENT_BUMP, eMaterialThickness thickness_type=MAT_THICKNESS_SPHERE, char blend_flags=0)
static eMaterialThickness to_thickness_type(int thickness_mode)
@ MAT_DISPLACEMENT_VERTEX_WITH_BUMP
@ MAT_PIPE_PREPASS_FORWARD_VELOCITY
@ MAT_PIPE_VOLUME_MATERIAL
@ MAT_PIPE_PREPASS_DEFERRED
@ MAT_PIPE_PREPASS_OVERLAP
@ MAT_PIPE_PREPASS_PLANAR
@ MAT_PIPE_PREPASS_DEFERRED_VELOCITY
@ MAT_PIPE_VOLUME_OCCUPANCY
@ MAT_PIPE_PREPASS_FORWARD
unsigned __int64 uint64_t
Vector< GPUMaterial * > gpu_materials
Vector< Material > materials
bool operator<(const MaterialKey &k) const
MaterialKey(::Material *mat_, eMaterialGeometry geometry, eMaterialPipeline pipeline, short visibility_flags)
bool operator==(const MaterialKey &k) const
bool is_alpha_blend_transparent
MaterialPass overlap_masking
MaterialPass volume_material
MaterialPass planar_probe_prepass
bool has_transparent_shadows
MaterialPass planar_probe_shading
MaterialPass volume_occupancy
MaterialPass lightprobe_sphere_shading
MaterialPass lightprobe_sphere_prepass
ShaderKey(GPUMaterial *gpumat, ::Material *blender_mat, eMaterialProbe probe_capture)
bool operator<(const ShaderKey &k) const
bool operator==(const ShaderKey &k) const