54 switch (displacement_method) {
73 switch (thickness_mode) {
92 bool &transparent_shadows)
94 const uint64_t geometry_mask = ((1u << 4u) - 1u);
95 const uint64_t pipeline_mask = ((1u << 4u) - 1u);
96 const uint64_t thickness_mask = ((1u << 1u) - 1u);
97 const uint64_t displacement_mask = ((1u << 1u) - 1u);
99 pipeline_type =
static_cast<eMaterialPipeline>((shader_uuid >> 4u) & pipeline_mask);
101 thickness_type =
static_cast<eMaterialThickness>((shader_uuid >> 9u) & thickness_mask);
102 transparent_shadows = (shader_uuid >> 10u) & 1u;
110 char blend_flags = 0)
119 uuid = geometry_type;
120 uuid |= pipeline_type << 4;
121 uuid |= displacement_type << 8;
122 uuid |= thickness_type << 9;
123 uuid |= transparent_shadows << 10;
188 int closure_data_slots = 0;
193 closure_data_slots |= (1 << 2);
196 closure_data_slots |= (1 << 0);
200 closure_data_slots |= (1 << 0);
203 closure_data_slots |= (1 << 0);
206 closure_data_slots |= (1 << 0);
209 closure_data_slots |= (1 << 1);
212 closure_data_slots |= (1 << 2);
250 short visibility_flags)
296 bool hide_from_raycast)
407 return default_materials_load(
false);
411 return default_materials_load(
true);
428 ShaderGroups default_materials_load(
bool block_until_ready =
false);
detail::PassBase< command::DrawMultiBuf > Sub
A running instance of the engine.
MaterialModule(Instance &inst)
ShaderGroups default_materials_load_async()
Material material_get(const ObjectHandle &ob_handle, bool has_motion, int mat_nr, eMaterialGeometry geometry_type)
int64_t queued_textures_count
ShaderGroups default_materials_wait_ready()
blender::Material * diffuse_mat
int64_t queued_optimize_shaders_count
MaterialArray & material_array_get(const ObjectHandle &ob_handle, bool has_motion)
bool material_time_changed
blender::Material * material_override
blender::Material * default_volume
int64_t queued_shaders_count
blender::Material * metallic_mat
blender::Material * default_surface
ENUM_OPERATORS(Layer::Flags)
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 int to_gbuffer_bin_count(const eClosureBits closure_bits)
static eMaterialGeometry to_pointcloud_material_geometry(const Object *ob)
static eMaterialThickness to_thickness_type(int thickness_mode)
@ MAT_DISPLACEMENT_VERTEX_WITH_BUMP
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
unsigned __int64 uint64_t
MINLINE int count_bits_i(unsigned int n)
@ GPU_MATFLAG_SHADER_TO_RGBA
@ GPU_MATFLAG_TRANSLUCENT
@ GPU_MATFLAG_TRANSPARENT
@ MA_BL_TRANSPARENT_SHADOW
gpu::Shader * GPU_material_get_shader(GPUMaterial *material)
bool GPU_material_flag_get(const GPUMaterial *mat, eGPUMaterialFlag flag)
@ MA_DISPLACEMENT_DISPLACE
T & DRW_object_get_data_for_drawing(const Object &object)
Vector< GPUMaterial * > gpu_materials
Vector< Material > materials
bool operator==(const MaterialKey &k) const
MaterialKey(blender::Material *mat_, eMaterialGeometry geometry, eMaterialPipeline pipeline, short visibility_flags)
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, blender::Material *blender_mat, eMaterialProbe probe_capture, bool hide_from_raycast)
bool operator==(const ShaderKey &k) const