Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2018-11-19 03:01:43 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-11-19 17:48:17 +0300
commitee44dd1b2bcff6bbd99084a012a40fb4a7100b2c (patch)
tree36975c1ff675bf4b57f3750105bac4ae02eafa24 /source/blender/draw/engines/workbench/workbench_forward.c
parent8d51e3c062dda1317586d744fcb8ff223ec0939a (diff)
Studio Lights: Big Cleanups
* Less Lengthy enum/macro names. * Optimize computation of Spherical Harmonics. * Reduce radiance cubemap size a bit. Higher resolution is not necessary. * Remove STUDIOLIGHT_LIGHT_DIRECTION_CALCULATED (was not used). * Do windowing on each component separately instead of using luminance. * Use ITER_PIXELS to iterate on each pixels, using pixel center coords. * Remove gpu_matcap_3components as it is only needed when creating the gputex. * Fix a lot of confusion in axis denomination/swizzle. These changes should not affect functionallity.
Diffstat (limited to 'source/blender/draw/engines/workbench/workbench_forward.c')
-rw-r--r--source/blender/draw/engines/workbench/workbench_forward.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/draw/engines/workbench/workbench_forward.c b/source/blender/draw/engines/workbench/workbench_forward.c
index 9991c30ea8e..aa75e1746c7 100644
--- a/source/blender/draw/engines/workbench/workbench_forward.c
+++ b/source/blender/draw/engines/workbench/workbench_forward.c
@@ -169,8 +169,8 @@ static WORKBENCH_MaterialData *get_or_create_material_data(
workbench_material_set_normal_world_matrix(grp, wpd, e_data.normal_world_matrix);
workbench_material_copy(material, &material_template);
if (STUDIOLIGHT_ORIENTATION_VIEWNORMAL_ENABLED(wpd)) {
- BKE_studiolight_ensure_flag(wpd->studio_light, STUDIOLIGHT_EQUIRECTANGULAR_RADIANCE_GPUTEXTURE);
- DRW_shgroup_uniform_texture(grp, "matcapImage", wpd->studio_light->equirectangular_radiance_gputexture);
+ BKE_studiolight_ensure_flag(wpd->studio_light, STUDIOLIGHT_EQUIRECT_RADIANCE_GPUTEXTURE);
+ DRW_shgroup_uniform_texture(grp, "matcapImage", wpd->studio_light->equirect_radiance_gputexture );
}
if (SPECULAR_HIGHLIGHT_ENABLED(wpd) || MATCAP_ENABLED(wpd)) {
DRW_shgroup_uniform_vec2(grp, "invertedViewportSize", DRW_viewport_invert_size_get(), 1);
@@ -456,8 +456,8 @@ static void workbench_forward_cache_populate_particles(WORKBENCH_Data *vedata, O
float hair_alpha = XRAY_ALPHA(wpd) * 0.33f;
DRW_shgroup_uniform_float_copy(shgrp, "alpha", hair_alpha);
if (STUDIOLIGHT_ORIENTATION_VIEWNORMAL_ENABLED(wpd)) {
- BKE_studiolight_ensure_flag(wpd->studio_light, STUDIOLIGHT_EQUIRECTANGULAR_RADIANCE_GPUTEXTURE);
- DRW_shgroup_uniform_texture(shgrp, "matcapImage", wpd->studio_light->equirectangular_radiance_gputexture);
+ BKE_studiolight_ensure_flag(wpd->studio_light, STUDIOLIGHT_EQUIRECT_RADIANCE_GPUTEXTURE);
+ DRW_shgroup_uniform_texture(shgrp, "matcapImage", wpd->studio_light->equirect_radiance_gputexture );
}
if (SPECULAR_HIGHLIGHT_ENABLED(wpd) || MATCAP_ENABLED(wpd)) {
DRW_shgroup_uniform_vec2(shgrp, "invertedViewportSize", DRW_viewport_invert_size_get(), 1);