|
|
@ -78,12 +78,12 @@ struct render_test : public test_scaffold { |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
auto l_sdf = gp::difference_sdf<float>( |
|
|
|
gp::sphere_sdf<float>({0.0,0.0,0.0}, 1.0), |
|
|
|
gp::sphere_sdf<float>({-0.75,0.0,0.0}, 1.0) |
|
|
|
); |
|
|
|
auto sphere = a.scene_elements.push( |
|
|
|
[&](vec3 pos) -> render_point { |
|
|
|
auto l_sdf = gp::difference_sdf<float>( |
|
|
|
gp::sphere_sdf<float>({0.0,0.0,0.0}, 1.0), |
|
|
|
gp::sphere_sdf<float>({-0.75,0.0,0.0}, 1.0) |
|
|
|
); |
|
|
|
render_point ret; |
|
|
|
ret.distance = l_sdf(pos); |
|
|
|
ret.material = red; |
|
|
@ -91,9 +91,9 @@ struct render_test : public test_scaffold { |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
auto l_sdf_b = gp::sphere_sdf<float>({-0.75,0.0,0.0}, 1.0); |
|
|
|
auto sphere2 = a.scene_elements.push( |
|
|
|
[&](vec3 pos) -> render_point { |
|
|
|
auto l_sdf_b = gp::sphere_sdf<float>({-0.75,0.0,0.0}, 1.0); |
|
|
|
render_point ret; |
|
|
|
ret.distance = l_sdf_b(pos); |
|
|
|
ret.material = green; |
|
|
|