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>2022-07-13 17:54:53 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-07-15 19:46:24 +0300
commit5152c7c152e52d563cbd3ba3c792de3af0c2c14f (patch)
tree45cad004066413ce309279ad52f2a363e5477150 /intern/cycles/kernel/types.h
parentbb376da6dfdd2476fc3738ce1fc89dac27825cef (diff)
Cycles: refactor rays to have start and end distance, fix precision issues
For transparency, volume and light intersection rays, adjust these distances rather than the ray start position. This way we increment the start distance by the smallest possible float increment to avoid self intersections, and be sure it works as the distance compared to be will be exactly the same as before, due to the ray start position and direction remaining the same. Fix T98764, T96537, hair ray tracing precision issues. Differential Revision: https://developer.blender.org/D15455
Diffstat (limited to 'intern/cycles/kernel/types.h')
-rw-r--r--intern/cycles/kernel/types.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/intern/cycles/kernel/types.h b/intern/cycles/kernel/types.h
index 62ac75e5e4d..05320deed19 100644
--- a/intern/cycles/kernel/types.h
+++ b/intern/cycles/kernel/types.h
@@ -535,7 +535,8 @@ typedef struct RaySelfPrimitives {
typedef struct Ray {
float3 P; /* origin */
float3 D; /* direction */
- float t; /* length of the ray */
+ float tmin; /* start distance */
+ float tmax; /* end distance */
float time; /* time (for motion blur) */
RaySelfPrimitives self;