Constructive Solid Geometry is the easiest way of modeling in CAD programs. With the use of Boolean operators (union, intersection, difference) and simple primitives like sphere, box and cylinders, it enables the creation of more complex objects. Most of the existing solutions do not work in a web browser, or use rasterization methods which render models only as accurate as their polygonal representation is. In this work we present a GPU based CSG raytracing approach which works in a web browser, is accurate, and achieves real-time frame rates with simpler CSG models. For the development of our approach we used both WebGL 2.0 and WebGL 2.0 Compute. The latter enables us the use of compute shaders and SSBOs. Our approach can be further improved with the use of data structures and synchronization mechanisms more suitable for GPUs.
|