针对传统光线投射算法采样效率低、绘制精度差等缺点,提出一种新的体绘制算法,所给算法采用新的采样合成函数,并结合经典的Blinn-Phong光照模型,采用不透明度提前截止判断光线终止。整个过程使用Cg语言编写顶点程序和片段程序来实现。实验结果表明算法既可以增强传统光线投射算法的绘制效果,也可以加快算法的速度。
For the low sampling efficiency and poor sampling efficiency in the traditional ray casting algorithm, a volume rendering algorithm with a new sample synthesis function is proposed. This algorithm applies Blinn-Phong illumination model and uses early opacity termination. It’s implemented by vertex programs and fragment programs in Cg language. The results of experiment show that this algorithm can not only enhance the effect of traditional ray-casting algorithm, but also accelerate the speed of the algorithm.