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/eevee_materials.c | |
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/eevee_materials.c')
-rw-r--r-- | source/blender/draw/engines/eevee/eevee_materials.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/draw/engines/eevee/eevee_materials.c b/source/blender/draw/engines/eevee/eevee_materials.c index 1cb630e6d59..ff7dda1152c 100644 --- a/source/blender/draw/engines/eevee/eevee_materials.c +++ b/source/blender/draw/engines/eevee/eevee_materials.c @@ -231,6 +231,13 @@ void EEVEE_materials_init(EEVEE_ViewLayerData *sldata, eevee_init_noise_texture(); } + if (draw_ctx->rv3d) { + copy_v4_v4(sldata->common_data.camera_uv_scale, draw_ctx->rv3d->viewcamtexcofac); + } + else { + copy_v4_fl4(sldata->common_data.camera_uv_scale, 1.0f, 1.0f, 0.0f, 0.0f); + } + if (!DRW_state_is_image_render() && ((stl->effects->enabled_effects & EFFECT_TAA) == 0)) { sldata->common_data.alpha_hash_offset = 0.0f; sldata->common_data.alpha_hash_scale = 1.0f; |