• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            4D星宇

            c++

              C++博客 :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
              57 隨筆 :: 0 文章 :: 39 評論 :: 0 Trackbacks

            DX9下使用
            D3DXPLANE plane; 
             D3DXPlaneFromPointNormal( &plane, &vPoint, &vNormal ); //生成這個平面
            D3DXMatrixReflect( &matReflect, &plane ); //取得該平面的反射矩陣
            //設置剪切平面,使反射面上的內容被渲染,面下的被丟棄
             m_pd3dDevice->SetClipPlane( 0, plane );
             m_pd3dDevice->SetRenderState( D3DRS_CLIPPLANEENABLE, 0x01 );
            DX10下模擬:
            User Clip PlanesUser Clip Planes are emulated by specifying a clip distance output from the Vertex Shader with the SV_ClipDistance[n] flag, where n is either 0 or 1. Each component can hold up to 4 clip distances in x, y, z, and w giving a total of 8 clip distances.

                用戶裁減平面通過在VS里設定一個SV_ClipDistance[n]標記,定義一個裁減距離輸出得到,n為0或1。這里一共能存放8個Clip Plane距離,分別使用數組兩個元素的x,y,z,w通道。

            In this scenario, each clip planes is defined by a plane equation of the form:

            在這個場景里,每個clip plane被一個平面方程定義:

            Ax + By + Cz + D =0;

            Where <A,B,C> is the normal of the plane, and D is the distance of the plane from the origin. Plugging in any point <x,y,z> into this equation gives its distance from the plane. Therefore, all points <x,y,z> that satisfy the equation Ax + By + Cz + D = 0 are on the plane. All points that satisfy Ax + By + Cz + D < 0 are below the plane. All points that satisfy Ax + By + Cz + D > 0 are above the plane.

            <A,B,C>是平面法向,D是平面到原點的距離。把任意點<x,y,z>代入方程能得到它到平面的距離。所有滿足方程=0的點在平面上,<0的點在平面下而 >0的點在平面上。

            In the Vertex Shader, each vertex is tested against each plane equation to produce a distance to the clip plane. Each of the three clip distances are stored in the first three components of the output component with the semantic SV_ClipDistance0. These clip distances get interpolated over the triangle during rasterization and clipped if the value every goes below 0.

                在VS中,每個頂點會帶入平面方程做測試。每個三角形的Clip距離存在SV_ClipDistance0語義輸出的前三個通道中。這個距離在光柵化中被線性插值,所有小于0的像素被剔除。

            posted on 2008-11-09 20:47 bloodbao 閱讀(1203) 評論(0)  編輯 收藏 引用 所屬分類: c++
            91久久九九无码成人网站| 久久精品国产欧美日韩| 嫩草伊人久久精品少妇AV| 国内精品久久久久伊人av| 国产精品热久久无码av| 久久影视国产亚洲| 99久久精品日本一区二区免费 | 日韩精品久久无码人妻中文字幕| 久久久婷婷五月亚洲97号色| 老司机午夜网站国内精品久久久久久久久| 综合久久久久久中文字幕亚洲国产国产综合一区首 | 久久无码AV中文出轨人妻| 一本久道久久综合狠狠爱| 精品久久国产一区二区三区香蕉| 久久久久久国产精品无码下载| 久久久国产精品网站| 亚洲AV无码久久精品成人 | 国产三级久久久精品麻豆三级| 精品久久久久久久中文字幕| 国产精品99久久免费观看| 国产成人精品久久| 日韩美女18网站久久精品| 香蕉久久一区二区不卡无毒影院| 久久久久av无码免费网| 午夜肉伦伦影院久久精品免费看国产一区二区三区 | 久久香综合精品久久伊人| 久久国产精品免费一区二区三区| 久久水蜜桃亚洲av无码精品麻豆| 欧美久久久久久| 亚洲欧美久久久久9999| 久久久中文字幕日本| yellow中文字幕久久网| 日本三级久久网| 婷婷综合久久狠狠色99h| 日本三级久久网| 精品久久久久久久中文字幕| 国产综合精品久久亚洲| 久久久久国产成人精品亚洲午夜| 精品久久人人爽天天玩人人妻| 国产精品内射久久久久欢欢| 国产成人久久精品一区二区三区 |