Fix #138159: EEVEE: Crash when rendering points with volume shader
This is caused by the pointcloud attribute header not being added to the volume shader. The fix is to make volume shaders not require volume attribute for geometry types that do not support it. Pull Request: https://projects.blender.org/blender/blender/pulls/138212
This commit is contained in:
committed by
Clément Foucault
parent
5055770f5b
commit
c5e9bc4113
@@ -701,8 +701,10 @@ void ShaderModule::material_create_info_amend(GPUMaterial *gpumat, GPUCodegenOut
|
||||
break;
|
||||
}
|
||||
|
||||
const bool support_volume_attributes = ELEM(geometry_type, MAT_GEOM_MESH, MAT_GEOM_VOLUME);
|
||||
const bool do_vertex_attrib_load = !ELEM(geometry_type, MAT_GEOM_WORLD, MAT_GEOM_VOLUME) &&
|
||||
(pipeline_type != MAT_PIPE_VOLUME_MATERIAL);
|
||||
(pipeline_type != MAT_PIPE_VOLUME_MATERIAL ||
|
||||
!support_volume_attributes);
|
||||
|
||||
if (!do_vertex_attrib_load && !info.vertex_out_interfaces_.is_empty()) {
|
||||
/* Codegen outputs only one interface. */
|
||||
|
||||
Reference in New Issue
Block a user