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:
authorBrecht Van Lommel <brecht@blender.org>2021-02-17 03:47:18 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-02-17 18:26:24 +0300
commit68dd7617d705dd255b29b99074afa107ce38031e (patch)
tree1e253ab76b87e7f22a09db2f1137db3a1b8ecb6c /intern/cycles/render/light.cpp
parent8119f0aad21c3ce88e82d68ed20cd5a8edc99703 (diff)
Cycles: add utility functions for zero float2/float3/float4/transform
Ref D8237, T78710
Diffstat (limited to 'intern/cycles/render/light.cpp')
-rw-r--r--intern/cycles/render/light.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/render/light.cpp b/intern/cycles/render/light.cpp
index 1e54a237816..d1e64e2ac14 100644
--- a/intern/cycles/render/light.cpp
+++ b/intern/cycles/render/light.cpp
@@ -116,17 +116,17 @@ NODE_DEFINE(Light)
type_enum.insert("spot", LIGHT_SPOT);
SOCKET_ENUM(light_type, "Type", type_enum, LIGHT_POINT);
- SOCKET_COLOR(strength, "Strength", make_float3(1.0f, 1.0f, 1.0f));
+ SOCKET_COLOR(strength, "Strength", one_float3());
- SOCKET_POINT(co, "Co", make_float3(0.0f, 0.0f, 0.0f));
+ SOCKET_POINT(co, "Co", zero_float3());
- SOCKET_VECTOR(dir, "Dir", make_float3(0.0f, 0.0f, 0.0f));
+ SOCKET_VECTOR(dir, "Dir", zero_float3());
SOCKET_FLOAT(size, "Size", 0.0f);
SOCKET_FLOAT(angle, "Angle", 0.0f);
- SOCKET_VECTOR(axisu, "Axis U", make_float3(0.0f, 0.0f, 0.0f));
+ SOCKET_VECTOR(axisu, "Axis U", zero_float3());
SOCKET_FLOAT(sizeu, "Size U", 1.0f);
- SOCKET_VECTOR(axisv, "Axis V", make_float3(0.0f, 0.0f, 0.0f));
+ SOCKET_VECTOR(axisv, "Axis V", zero_float3());
SOCKET_FLOAT(sizev, "Size V", 1.0f);
SOCKET_BOOLEAN(round, "Round", false);
@@ -173,7 +173,7 @@ void Light::tag_update(Scene *scene)
bool Light::has_contribution(Scene *scene)
{
- if (strength == make_float3(0.0f, 0.0f, 0.0f)) {
+ if (strength == zero_float3()) {
return false;
}
if (is_portal) {