diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2022-10-06 17:42:19 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2022-10-07 13:43:09 +0300 |
commit | 03a7f1d7b1103e693a5a3ee95ed5f4bc46b1ca54 (patch) | |
tree | 668be1884d269b12a716e50b138cc017f33aec5d /source/blender/draw/engines/eevee_next/eevee_pipeline.cc | |
parent | 055680a89e4b37662daf0c397539866a42c6d54a (diff) |
DRW: Move CameraTexCoFactors to engine specific storage
This is part of the effor to simplify the View struct in order to implement
multiview rendering.
The CameraTexCoFactors being only valid for a single view, and being only
used in very few places, it make sense to move it to the engine side.
Diffstat (limited to 'source/blender/draw/engines/eevee_next/eevee_pipeline.cc')
-rw-r--r-- | source/blender/draw/engines/eevee_next/eevee_pipeline.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc index cc5a4d56231..e6b37b4ad47 100644 --- a/source/blender/draw/engines/eevee_next/eevee_pipeline.cc +++ b/source/blender/draw/engines/eevee_next/eevee_pipeline.cc @@ -79,6 +79,8 @@ void ForwardPipeline::sync() /* Textures. */ prepass_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx); + /* Uniform Buf. */ + prepass_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get()); inst_.velocity.bind_resources(&prepass_ps_); inst_.sampling.bind_resources(&prepass_ps_); @@ -117,6 +119,8 @@ void ForwardPipeline::sync() opaque_ps_.bind_ssbo(RBUFS_AOV_BUF_SLOT, &inst_.film.aovs_info); /* Textures. */ opaque_ps_.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx); + /* Uniform Buf. */ + opaque_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get()); inst_.lights.bind_resources(&opaque_ps_); inst_.sampling.bind_resources(&opaque_ps_); @@ -140,6 +144,8 @@ void ForwardPipeline::sync() /* Textures. */ sub.bind_texture(RBUFS_UTILITY_TEX_SLOT, inst_.pipelines.utility_tx); + /* Uniform Buf. */ + opaque_ps_.bind_ubo(CAMERA_BUF_SLOT, inst_.camera.ubo_get()); inst_.lights.bind_resources(&sub); inst_.sampling.bind_resources(&sub); |