diff --git a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc index e90ffa2af55..f41f8bc30bc 100644 --- a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc +++ b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc @@ -281,6 +281,7 @@ void ForwardPipeline::sync() inst_.bind_uniform_data(&opaque_ps_); inst_.lights.bind_resources(&opaque_ps_); inst_.shadows.bind_resources(&opaque_ps_); + inst_.volume.bind_resources(&opaque_ps_); inst_.sampling.bind_resources(&opaque_ps_); inst_.hiz_buffer.bind_resources(&opaque_ps_); inst_.irradiance_cache.bind_resources(&opaque_ps_); @@ -308,9 +309,11 @@ void ForwardPipeline::sync() inst_.bind_uniform_data(&sub); inst_.lights.bind_resources(&sub); inst_.shadows.bind_resources(&sub); - inst_.volume.bind_resources(sub); + inst_.volume.bind_resources(&sub); inst_.sampling.bind_resources(&sub); inst_.hiz_buffer.bind_resources(&sub); + inst_.irradiance_cache.bind_resources(&sub); + inst_.reflection_probes.bind_resources(&sub); } } diff --git a/source/blender/draw/engines/eevee_next/eevee_shadow.cc b/source/blender/draw/engines/eevee_next/eevee_shadow.cc index 8c1121a5e80..c33f195abe2 100644 --- a/source/blender/draw/engines/eevee_next/eevee_shadow.cc +++ b/source/blender/draw/engines/eevee_next/eevee_shadow.cc @@ -1089,7 +1089,7 @@ void ShadowModule::end_sync() inst_.hiz_buffer.bind_resources(&sub); inst_.sampling.bind_resources(&sub); inst_.lights.bind_resources(&sub); - inst_.volume.bind_resources(sub); + inst_.volume.bind_resources(&sub); inst_.volume.bind_properties_buffers(sub); sub.barrier(GPU_BARRIER_SHADER_IMAGE_ACCESS); sub.dispatch(math::divide_ceil(inst_.volume.grid_size(), int3(VOLUME_GROUP_SIZE))); diff --git a/source/blender/draw/engines/eevee_next/eevee_volume.cc b/source/blender/draw/engines/eevee_next/eevee_volume.cc index 1f85b462931..2fb093b61de 100644 --- a/source/blender/draw/engines/eevee_next/eevee_volume.cc +++ b/source/blender/draw/engines/eevee_next/eevee_volume.cc @@ -292,7 +292,7 @@ void VolumeModule::end_sync() resolve_ps_.state_set(DRW_STATE_WRITE_COLOR | DRW_STATE_BLEND_CUSTOM); resolve_ps_.shader_set(inst_.shaders.static_shader_get(VOLUME_RESOLVE)); inst_.bind_uniform_data(&resolve_ps_); - bind_resources(resolve_ps_); + bind_resources(&resolve_ps_); resolve_ps_.bind_texture("depth_tx", &inst_.render_buffers.depth_tx); resolve_ps_.bind_image(RBUFS_COLOR_SLOT, &inst_.render_buffers.rp_color_tx); /* Sync with the integration pass. */ diff --git a/source/blender/draw/engines/eevee_next/eevee_volume.hh b/source/blender/draw/engines/eevee_next/eevee_volume.hh index 98ba84afc5c..751ae54a65b 100644 --- a/source/blender/draw/engines/eevee_next/eevee_volume.hh +++ b/source/blender/draw/engines/eevee_next/eevee_volume.hh @@ -101,10 +101,10 @@ class VolumeModule { ~VolumeModule(){}; /* Bind resources needed by external passes to perform their own resolve. */ - template void bind_resources(PassType &ps) + template void bind_resources(PassType *ps) { - ps.bind_texture(VOLUME_SCATTERING_TEX_SLOT, &transparent_pass_scatter_tx_); - ps.bind_texture(VOLUME_TRANSMITTANCE_TEX_SLOT, &transparent_pass_transmit_tx_); + ps->bind_texture(VOLUME_SCATTERING_TEX_SLOT, &transparent_pass_scatter_tx_); + ps->bind_texture(VOLUME_TRANSMITTANCE_TEX_SLOT, &transparent_pass_transmit_tx_); } /* Bind the common resources needed by all volumetric passes. */