Changeset View
Changeset View
Standalone View
Standalone View
source/blender/draw/engines/eevee/eevee_materials.c
| Show First 20 Lines • Show All 845 Lines • ▼ Show 20 Lines | if (ELEM(ob->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL)) { | ||||
| } | } | ||||
| /* Only support single volume material for now. */ | /* Only support single volume material for now. */ | ||||
| /* XXX We rely on the previously compiled surface shader | /* XXX We rely on the previously compiled surface shader | ||||
| * to know if the material has a "volume nodetree". | * to know if the material has a "volume nodetree". | ||||
| */ | */ | ||||
| bool use_volume_material = (matcache[0].shading_gpumat && | bool use_volume_material = (matcache[0].shading_gpumat && | ||||
| GPU_material_has_volume_output(matcache[0].shading_gpumat)); | GPU_material_has_volume_output(matcache[0].shading_gpumat)); | ||||
| const bool is_final_image_render = DRW_state_is_image_render() && | |||||
| if ((ob->dt >= OB_SOLID) || DRW_state_is_image_render()) { | !DRW_state_is_opengl_render(); | ||||
| if ((ob->dt >= OB_SOLID) || is_final_image_render) { | |||||
jbakker: Or should we just use DRW_state_is_scene_render() | |||||
| if (use_sculpt_pbvh) { | if (use_sculpt_pbvh) { | ||||
| struct DRWShadingGroup **shgrps_array = BLI_array_alloca(shgrps_array, materials_len); | struct DRWShadingGroup **shgrps_array = BLI_array_alloca(shgrps_array, materials_len); | ||||
| MATCACHE_AS_ARRAY(matcache, shading_grp, materials_len, shgrps_array); | MATCACHE_AS_ARRAY(matcache, shading_grp, materials_len, shgrps_array); | ||||
| DRW_shgroup_call_sculpt_with_materials(shgrps_array, materials_len, ob); | DRW_shgroup_call_sculpt_with_materials(shgrps_array, materials_len, ob); | ||||
| MATCACHE_AS_ARRAY(matcache, depth_grp, materials_len, shgrps_array); | MATCACHE_AS_ARRAY(matcache, depth_grp, materials_len, shgrps_array); | ||||
| DRW_shgroup_call_sculpt_with_materials(shgrps_array, materials_len, ob); | DRW_shgroup_call_sculpt_with_materials(shgrps_array, materials_len, ob); | ||||
| ▲ Show 20 Lines • Show All 248 Lines • Show Last 20 Lines | |||||
Or should we just use DRW_state_is_scene_render()