科技通报
科技通報
과기통보
BULLETIN OF SCIENCE AND TECHNOLOGY
2013年
12期
79-81,102
,共4页
自然粒子效果%Z缓冲%几何着色器%公布板
自然粒子效果%Z緩遲%幾何著色器%公佈闆
자연입자효과%Z완충%궤하착색기%공포판
natural particles%depth Buffer%geometry shader%billboard
以往粒子精灵半透明效果,如雾、烟、尘,魔法和爆炸等,在与场景背景相交处会产生不自然的尖锐边缘。该文设置过渡区来解决,依据深度值比较使粒子精灵产生逐渐淡出效果。首先,几何着色器扩展粒子位置成两个三角形,生成正方形的粒子精灵,以公布板技术定位其方向面向视点。然后,通过DirectX10像素着色器读取作为纹理存在的Z缓冲,生成与背景相互交融的软粒子精灵。实验获得了良好效果的同时,渲染性能没有受到明显的影响。
以往粒子精靈半透明效果,如霧、煙、塵,魔法和爆炸等,在與場景揹景相交處會產生不自然的尖銳邊緣。該文設置過渡區來解決,依據深度值比較使粒子精靈產生逐漸淡齣效果。首先,幾何著色器擴展粒子位置成兩箇三角形,生成正方形的粒子精靈,以公佈闆技術定位其方嚮麵嚮視點。然後,通過DirectX10像素著色器讀取作為紋理存在的Z緩遲,生成與揹景相互交融的軟粒子精靈。實驗穫得瞭良好效果的同時,渲染性能沒有受到明顯的影響。
이왕입자정령반투명효과,여무、연、진,마법화폭작등,재여장경배경상교처회산생불자연적첨예변연。해문설치과도구래해결,의거심도치비교사입자정령산생축점담출효과。수선,궤하착색기확전입자위치성량개삼각형,생성정방형적입자정령,이공포판기술정위기방향면향시점。연후,통과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.