Skip to content

Commit

Permalink
PYMOL-3504 ray_interior_color atomic
Browse files Browse the repository at this point in the history
Use current primitive color for ray interior coloring with
`set ray_interior_color, atomic`.

Only supported in ray tracing.

Closes #120
  • Loading branch information
speleo3 committed Aug 6, 2020
1 parent 1e69c53 commit 8f5c06b
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions layer1/Ray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3811,10 +3811,13 @@ int RayTraceThread(CRayThreadInfo * T)
RayReflectAndTexture(I, &r1, perspective);

dotgle = -r1.dotgle;
if((interior_color < 0) && (interior_color > cColorExtCutoff)) {
copy3f(r1.prim->ic, fc);
} else {
if (interior_color >= 0 || interior_color <= cColorExtCutoff) {
copy3f(inter, fc);
} else if (interior_color == cColorAtomic) {
// Affects spheres+cylinders, but not surfaces+cartoon.
copy3f(r1.prim->c1, fc);
} else {
copy3f(r1.prim->ic, fc);
}
} else {
if(!perspective)
Expand Down Expand Up @@ -3945,10 +3948,14 @@ int RayTraceThread(CRayThreadInfo * T)
}

dotgle = -r1.dotgle;
if((interior_color < 0) && (interior_color > cColorExtCutoff)) {
copy3f(r1.prim->ic, fc);
} else {
if (interior_color >= 0 ||
interior_color <= cColorExtCutoff) {
copy3f(inter, fc);
} else if (interior_color == cColorAtomic) {
// Affects surfaces+cartoon, but not spheres+cylinders.
copy3f(r1.prim->c1, fc);
} else {
copy3f(r1.prim->ic, fc);
}
}
}
Expand Down

0 comments on commit 8f5c06b

Please sign in to comment.