RayMarching


ray initialize

t total distance travelled

c
for(){
  vec3 p //distance along the 

  d;//current

  t+= d; //march
}

判定逻辑:

本质:屏幕空间没有真实几何体,只能靠"深度缓冲的遮挡关系"近似求交——当光线点的深度越过了该像素的表面深度,就认为撞上了。