Cleanup: Cycles: Add Kernel
prefix to light tree bounding shapes
BoundingBox -> KernelBoundingBox BoundingCone -> KernelBoundingCone Pull Request: https://projects.blender.org/blender/blender/pulls/130141
This commit is contained in:

committed by
Weizhen Huang

parent
dbbacbffaf
commit
90ed91dfdb
@@ -286,7 +286,7 @@ template<bool in_volume_segment>
|
||||
ccl_device_forceinline bool spot_light_tree_parameters(const ccl_global KernelLight *klight,
|
||||
const float3 centroid,
|
||||
const float3 P,
|
||||
const ccl_private BoundingCone &bcone,
|
||||
const ccl_private KernelBoundingCone &bcone,
|
||||
ccl_private float &cos_theta_u,
|
||||
ccl_private float2 &distance,
|
||||
ccl_private float3 &point_to_centroid,
|
||||
|
@@ -24,7 +24,7 @@
|
||||
CCL_NAMESPACE_BEGIN
|
||||
|
||||
/* Consine of the angle subtended by the smallest enclosing sphere of the node bounding box. */
|
||||
ccl_device float light_tree_cos_bound_subtended_angle(const BoundingBox bbox,
|
||||
ccl_device float light_tree_cos_bound_subtended_angle(const KernelBoundingBox bbox,
|
||||
const float3 centroid,
|
||||
const float3 P)
|
||||
{
|
||||
@@ -121,7 +121,7 @@ ccl_device void light_tree_importance(const float3 N_or_D,
|
||||
const bool has_transmission,
|
||||
const float3 point_to_centroid,
|
||||
const float cos_theta_u,
|
||||
const BoundingCone bcone,
|
||||
const KernelBoundingCone bcone,
|
||||
const float max_distance,
|
||||
const float min_distance,
|
||||
const float energy,
|
||||
@@ -303,8 +303,8 @@ ccl_device void light_tree_node_importance(KernelGlobals kg,
|
||||
ccl_private float &max_importance,
|
||||
ccl_private float &min_importance)
|
||||
{
|
||||
const BoundingCone bcone = knode->bcone;
|
||||
const BoundingBox bbox = knode->bbox;
|
||||
const KernelBoundingCone bcone = knode->bcone;
|
||||
const KernelBoundingBox bbox = knode->bbox;
|
||||
|
||||
float3 point_to_centroid;
|
||||
float cos_theta_u, distance, theta_d;
|
||||
@@ -395,7 +395,7 @@ ccl_device void light_tree_emitter_importance(KernelGlobals kg,
|
||||
return;
|
||||
}
|
||||
|
||||
BoundingCone bcone;
|
||||
KernelBoundingCone bcone;
|
||||
bcone.theta_o = kemitter->theta_o;
|
||||
bcone.theta_e = kemitter->theta_e;
|
||||
float cos_theta_u, theta_d = 1.0f;
|
||||
|
@@ -296,7 +296,7 @@ ccl_device_forceinline bool triangle_light_tree_parameters(
|
||||
const float3 centroid,
|
||||
const float3 P,
|
||||
const float3 N,
|
||||
const BoundingCone bcone,
|
||||
const KernelBoundingCone bcone,
|
||||
ccl_private float &cos_theta_u,
|
||||
ccl_private float2 &distance,
|
||||
ccl_private float3 &point_to_centroid)
|
||||
|
@@ -1642,12 +1642,12 @@ typedef struct KernelLightDistribution {
|
||||
static_assert_align(KernelLightDistribution, 16);
|
||||
|
||||
/* Bounding box. */
|
||||
using BoundingBox = struct BoundingBox {
|
||||
struct KernelBoundingBox {
|
||||
packed_float3 min;
|
||||
packed_float3 max;
|
||||
};
|
||||
|
||||
using BoundingCone = struct BoundingCone {
|
||||
struct KernelBoundingCone {
|
||||
packed_float3 axis;
|
||||
float theta_o;
|
||||
float theta_e;
|
||||
@@ -1662,10 +1662,10 @@ enum LightTreeNodeType : uint8_t {
|
||||
|
||||
typedef struct KernelLightTreeNode {
|
||||
/* Bounding box. */
|
||||
BoundingBox bbox;
|
||||
KernelBoundingBox bbox;
|
||||
|
||||
/* Bounding cone. */
|
||||
BoundingCone bcone;
|
||||
KernelBoundingCone bcone;
|
||||
|
||||
/* Energy. */
|
||||
float energy;
|
||||
|
Reference in New Issue
Block a user