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:
authorHans Goudey <h.goudey@me.com>2022-04-03 20:07:43 +0300
committerHans Goudey <h.goudey@me.com>2022-04-03 20:07:43 +0300
commitae3f44322091fea28312c2c159c36b5bcc40b543 (patch)
treef9db2ba3325efb6e3999166da83bb207aaaaa61f
parentb9d1b07a4568fc21a9b4cd7f100e0a6370246ba3 (diff)
parentbe699936af7b86ae542f7cc73caf56ab9de350d3 (diff)
Merge branch 'master' into temp-ui-cpptemp-ui-cpp
-rw-r--r--intern/cycles/blender/addon/ui.py12
-rw-r--r--intern/cycles/kernel/film/accumulate.h86
2 files changed, 52 insertions, 46 deletions
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index 621a5571f63..c97afa86fad 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -1088,7 +1088,7 @@ class CYCLES_OBJECT_PT_shading(CyclesButtonsPanel, Panel):
return False
ob = context.object
- return ob and has_geometry_visibility(ob) and ob.type != 'LIGHT'
+ return ob and has_geometry_visibility(ob)
def draw(self, context):
pass
@@ -1099,6 +1099,10 @@ class CYCLES_OBJECT_PT_shading_shadow_terminator(CyclesButtonsPanel, Panel):
bl_parent_id = "CYCLES_OBJECT_PT_shading"
bl_context = "object"
+ @classmethod
+ def poll(cls, context):
+ return context.object.type != 'LIGHT'
+
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1116,6 +1120,10 @@ class CYCLES_OBJECT_PT_shading_gi_approximation(CyclesButtonsPanel, Panel):
bl_parent_id = "CYCLES_OBJECT_PT_shading"
bl_context = "object"
+ @classmethod
+ def poll(cls, context):
+ return context.object.type != 'LIGHT'
+
def draw(self, context):
layout = self.layout
layout.use_property_split = True
@@ -1138,7 +1146,7 @@ class CYCLES_OBJECT_PT_shading_caustics(CyclesButtonsPanel, Panel):
@classmethod
def poll(cls, context):
- return CyclesButtonsPanel.poll(context) and not use_metal(context)
+ return CyclesButtonsPanel.poll(context) and not use_metal(context) and context.object.type != 'LIGHT'
def draw(self, context):
layout = self.layout
diff --git a/intern/cycles/kernel/film/accumulate.h b/intern/cycles/kernel/film/accumulate.h
index 4c4165f3640..e10acfd7eb5 100644
--- a/intern/cycles/kernel/film/accumulate.h
+++ b/intern/cycles/kernel/film/accumulate.h
@@ -348,64 +348,62 @@ ccl_device_inline void kernel_accum_emission_or_background_pass(
}
# endif /* __DENOISING_FEATURES__ */
+ if (lightgroup != LIGHTGROUP_NONE && kernel_data.film.pass_lightgroup != PASS_UNUSED) {
+ kernel_write_pass_float3(buffer + kernel_data.film.pass_lightgroup + 3 * lightgroup,
+ contribution);
+ }
+
if (!(path_flag & PATH_RAY_ANY_PASS)) {
/* Directly visible, write to emission or background pass. */
pass_offset = pass;
}
- else {
+ else if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) {
/* Don't write any light passes for shadow catcher, for easier
* compositing back together of the combined pass. */
if (path_flag & PATH_RAY_SHADOW_CATCHER_HIT) {
return;
}
- if (lightgroup != LIGHTGROUP_NONE && kernel_data.film.pass_lightgroup != PASS_UNUSED) {
- kernel_write_pass_float3(buffer + kernel_data.film.pass_lightgroup + 3 * lightgroup,
- contribution);
- }
-
- if (kernel_data.kernel_features & KERNEL_FEATURE_LIGHT_PASSES) {
- if (path_flag & PATH_RAY_SURFACE_PASS) {
- /* Indirectly visible through reflection. */
- const float3 diffuse_weight = INTEGRATOR_STATE(state, path, pass_diffuse_weight);
- const float3 glossy_weight = INTEGRATOR_STATE(state, path, pass_glossy_weight);
-
- /* Glossy */
- const int glossy_pass_offset = ((INTEGRATOR_STATE(state, path, bounce) == 1) ?
- kernel_data.film.pass_glossy_direct :
- kernel_data.film.pass_glossy_indirect);
- if (glossy_pass_offset != PASS_UNUSED) {
- kernel_write_pass_float3(buffer + glossy_pass_offset, glossy_weight * contribution);
- }
-
- /* Transmission */
- const int transmission_pass_offset = ((INTEGRATOR_STATE(state, path, bounce) == 1) ?
- kernel_data.film.pass_transmission_direct :
- kernel_data.film.pass_transmission_indirect);
-
- if (transmission_pass_offset != PASS_UNUSED) {
- /* Transmission is what remains if not diffuse and glossy, not stored explicitly to save
- * GPU memory. */
- const float3 transmission_weight = one_float3() - diffuse_weight - glossy_weight;
- kernel_write_pass_float3(buffer + transmission_pass_offset,
- transmission_weight * contribution);
- }
+ if (path_flag & PATH_RAY_SURFACE_PASS) {
+ /* Indirectly visible through reflection. */
+ const float3 diffuse_weight = INTEGRATOR_STATE(state, path, pass_diffuse_weight);
+ const float3 glossy_weight = INTEGRATOR_STATE(state, path, pass_glossy_weight);
+
+ /* Glossy */
+ const int glossy_pass_offset = ((INTEGRATOR_STATE(state, path, bounce) == 1) ?
+ kernel_data.film.pass_glossy_direct :
+ kernel_data.film.pass_glossy_indirect);
+ if (glossy_pass_offset != PASS_UNUSED) {
+ kernel_write_pass_float3(buffer + glossy_pass_offset, glossy_weight * contribution);
+ }
- /* Reconstruct diffuse subset of throughput. */
- pass_offset = (INTEGRATOR_STATE(state, path, bounce) == 1) ?
- kernel_data.film.pass_diffuse_direct :
- kernel_data.film.pass_diffuse_indirect;
- if (pass_offset != PASS_UNUSED) {
- contribution *= diffuse_weight;
- }
+ /* Transmission */
+ const int transmission_pass_offset = ((INTEGRATOR_STATE(state, path, bounce) == 1) ?
+ kernel_data.film.pass_transmission_direct :
+ kernel_data.film.pass_transmission_indirect);
+
+ if (transmission_pass_offset != PASS_UNUSED) {
+ /* Transmission is what remains if not diffuse and glossy, not stored explicitly to save
+ * GPU memory. */
+ const float3 transmission_weight = one_float3() - diffuse_weight - glossy_weight;
+ kernel_write_pass_float3(buffer + transmission_pass_offset,
+ transmission_weight * contribution);
}
- else if (path_flag & PATH_RAY_VOLUME_PASS) {
- /* Indirectly visible through volume. */
- pass_offset = (INTEGRATOR_STATE(state, path, bounce) == 1) ?
- kernel_data.film.pass_volume_direct :
- kernel_data.film.pass_volume_indirect;
+
+ /* Reconstruct diffuse subset of throughput. */
+ pass_offset = (INTEGRATOR_STATE(state, path, bounce) == 1) ?
+ kernel_data.film.pass_diffuse_direct :
+ kernel_data.film.pass_diffuse_indirect;
+ if (pass_offset != PASS_UNUSED) {
+ contribution *= diffuse_weight;
}
}
+ else if (path_flag & PATH_RAY_VOLUME_PASS) {
+ /* Indirectly visible through volume. */
+ pass_offset = (INTEGRATOR_STATE(state, path, bounce) == 1) ?
+ kernel_data.film.pass_volume_direct :
+ kernel_data.film.pass_volume_indirect;
+ }
}
/* Single write call for GPU coherence. */