摘要
以往粒子精灵半透明效果,如雾、烟、尘,魔法和爆炸等,在与场景背景相交处会产生不自然的尖锐边缘。该文设置过渡区来解决,依据深度值比较使粒子精灵产生逐渐淡出效果。首先,几何着色器扩展粒子位置成两个三角形,生成正方形的粒子精灵,以公布板技术定位其方向面向视点。然后,通过DirectX10像素着色器读取作为纹理存在的Z缓冲,生成与背景相互交融的软粒子精灵。实验获得了良好效果的同时,渲染性能没有受到明显的影响。
Translucent effects of particle sprites In past, such as fog, smoke, dust, magic and explosion, often produced unnatural sharp edges in intersect space with background.The article set transition region to resolve, according to the depth value particles sprite gradually faded out effect. First, the position of the particle geometry shader extension into two triangles generate square particles sprite and locate its direction by the announcement board technology oriented viewpoint. Second, using DirectX10 pixel shader to read the particles sprite Z buffer as a texture, interacting with each other to generate the background. Experiments got good soft particles sprites effect, rendering performance was not significantly affected.
出处
《科技通报》
北大核心
2013年第12期79-81,102,共4页
Bulletin of Science and Technology
基金
2012年度广西高等学校科研项目(201204LX626)