diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-02-25 23:36:09 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2022-02-25 23:36:09 +0300 |
commit | bdf4e1596d4560c0bb1d79cd5344b3e6524e1037 (patch) | |
tree | cb0387c797007ee4adff5deab45e582e64ce6109 /intern/cycles/kernel/geom/point.h | |
parent | 1a8db5b717299eee1a6e9726c9de0abe5c169253 (diff) | |
parent | c8b4e0c0b5f874906d746637c5a006d990b72e49 (diff) |
Merge remote-tracking branch 'origin/blender-v3.1-release'
Diffstat (limited to 'intern/cycles/kernel/geom/point.h')
-rw-r--r-- | intern/cycles/kernel/geom/point.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/kernel/geom/point.h b/intern/cycles/kernel/geom/point.h index f7c6cb86c5e..041ecb3c2cf 100644 --- a/intern/cycles/kernel/geom/point.h +++ b/intern/cycles/kernel/geom/point.h @@ -128,9 +128,10 @@ ccl_device float point_radius(KernelGlobals kg, ccl_private const ShaderData *sd return r; } else { - float3 dir = make_float3(r, r, r); + const float normalized_r = r * (1.0f / M_SQRT3_F); + float3 dir = make_float3(normalized_r, normalized_r, normalized_r); object_dir_transform(kg, sd, &dir); - return average(dir); + return len(dir); } } |