作者:Mike Ton 8 年以前
393
更多类似内容
// This now belongs to a family of functions called signed distance functions
0 == sphere surface
negative == inside sphere
positive == outside sphere
float sphereHit (float3 p) { ... }
return distance(p,_Centre) - _Radius;
bool sphereHit (float3 p) { ... }
return distance(p,_Centre) < _Radius;
A variant of raymarching that can render semitransparent surfaces such as fog and smoke.