Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee_next/eevee_sync.cc
| Show First 20 Lines • Show All 114 Lines • ▼ Show 20 Lines | for (auto i : material_array.gpu_materials.index_range()) { | ||||
| } | } | ||||
| Material *material = material_array.materials[i]; | Material *material = material_array.materials[i]; | ||||
| geometry_call(material->shading.sub_pass, geom, res_handle); | geometry_call(material->shading.sub_pass, geom, res_handle); | ||||
| geometry_call(material->prepass.sub_pass, geom, res_handle); | geometry_call(material->prepass.sub_pass, geom, res_handle); | ||||
| geometry_call(material->shadow.sub_pass, geom, res_handle); | geometry_call(material->shadow.sub_pass, geom, res_handle); | ||||
| is_shadow_caster = is_shadow_caster || material->shadow.sub_pass != nullptr; | is_shadow_caster = is_shadow_caster || material->shadow.sub_pass != nullptr; | ||||
| is_alpha_blend = is_alpha_blend || material->is_alpha_blend_transparent; | is_alpha_blend = is_alpha_blend || material->is_alpha_blend_transparent; | ||||
| GPUMaterial *gpu_material = material_array.gpu_materials[i]; | |||||
| ::Material *mat = GPU_material_get_material(gpu_material); | |||||
| inst_.cryptomatte.sync_material(mat); | |||||
| } | } | ||||
| inst_.manager->extract_object_attributes(res_handle, ob_ref, material_array.gpu_materials); | inst_.manager->extract_object_attributes(res_handle, ob_ref, material_array.gpu_materials); | ||||
| inst_.cryptomatte.sync_object(ob, res_handle); | |||||
| // shadows.sync_object(ob, ob_handle, is_shadow_caster, is_alpha_blend); | // shadows.sync_object(ob, ob_handle, is_shadow_caster, is_alpha_blend); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||
| /** \name GPencil | /** \name GPencil | ||||
| * \{ */ | * \{ */ | ||||
| ▲ Show 20 Lines • Show All 180 Lines • ▼ Show 20 Lines | void SyncModule::sync_curves(Object *ob, | ||||
| bool has_motion = inst_.velocity.step_object_sync(ob, ob_handle.object_key, ob_handle.recalc); | bool has_motion = inst_.velocity.step_object_sync(ob, ob_handle.object_key, ob_handle.recalc); | ||||
| Material &material = inst_.materials.material_get(ob, has_motion, mat_nr - 1, MAT_GEOM_CURVES); | Material &material = inst_.materials.material_get(ob, has_motion, mat_nr - 1, MAT_GEOM_CURVES); | ||||
| shgroup_curves_call(material.shading, ob, part_sys, modifier_data); | shgroup_curves_call(material.shading, ob, part_sys, modifier_data); | ||||
| shgroup_curves_call(material.prepass, ob, part_sys, modifier_data); | shgroup_curves_call(material.prepass, ob, part_sys, modifier_data); | ||||
| shgroup_curves_call(material.shadow, ob, part_sys, modifier_data); | shgroup_curves_call(material.shadow, ob, part_sys, modifier_data); | ||||
| inst_.cryptomatte.sync_object(ob, res_handle); | |||||
| GPUMaterial *gpu_material = | |||||
| inst_.materials.material_array_get(ob, has_motion).gpu_materials[mat_nr - 1]; | |||||
| ::Material *mat = GPU_material_get_material(gpu_material); | |||||
| inst_.cryptomatte.sync_material(mat); | |||||
| /* TODO(fclem) Hair velocity. */ | /* TODO(fclem) Hair velocity. */ | ||||
| // shading_passes.velocity.gpencil_add(ob, ob_handle); | // shading_passes.velocity.gpencil_add(ob, ob_handle); | ||||
| // bool is_caster = material.shadow.sub_pass != nullptr; | // bool is_caster = material.shadow.sub_pass != nullptr; | ||||
| // bool is_alpha_blend = material.is_alpha_blend_transparent; | // bool is_alpha_blend = material.is_alpha_blend_transparent; | ||||
| // shadows.sync_object(ob, ob_handle, is_caster, is_alpha_blend); | // shadows.sync_object(ob, ob_handle, is_caster, is_alpha_blend); | ||||
| } | } | ||||
| /** \} */ | /** \} */ | ||||
| } // namespace blender::eevee | } // namespace blender::eevee | ||||