• <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++博客 :: 首頁(yè) :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
              57 隨筆 :: 0 文章 :: 39 評(píng)論 :: 0 Trackbacks

            DX9下使用
            D3DXPLANE plane; 
             D3DXPlaneFromPointNormal( &plane, &vPoint, &vNormal ); //生成這個(gè)平面
            D3DXMatrixReflect( &matReflect, &plane ); //取得該平面的反射矩陣
            //設(shè)置剪切平面,使反射面上的內(nèi)容被渲染,面下的被丟棄
             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.

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

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

            在這個(gè)場(chǎng)景里,每個(gè)clip plane被一個(gè)平面方程定義:

            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是平面到原點(diǎn)的距離。把任意點(diǎn)<x,y,z>代入方程能得到它到平面的距離。所有滿足方程=0的點(diǎn)在平面上,<0的點(diǎn)在平面下而 >0的點(diǎn)在平面上。

            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中,每個(gè)頂點(diǎn)會(huì)帶入平面方程做測(cè)試。每個(gè)三角形的Clip距離存在SV_ClipDistance0語(yǔ)義輸出的前三個(gè)通道中。這個(gè)距離在光柵化中被線性插值,所有小于0的像素被剔除。

            posted on 2008-11-09 20:47 bloodbao 閱讀(1203) 評(píng)論(0)  編輯 收藏 引用 所屬分類: c++
            久久精品国产亚洲AV香蕉| 久久一本综合| AV无码久久久久不卡蜜桃| 国产精品久久永久免费| 狠狠综合久久综合中文88| 色综合久久88色综合天天 | 久久精品中文闷骚内射| 久久综合色之久久综合| 久久99国内精品自在现线| 狠狠色综合网站久久久久久久| 精品伊人久久久| 99久久精品这里只有精品| 人妻精品久久无码区| 亚洲AV伊人久久青青草原| 久久精品国产清高在天天线| 亚洲人成网站999久久久综合| 精品国产乱码久久久久久郑州公司| 欧美成a人片免费看久久| 久久久久久国产精品无码超碰| 精品无码人妻久久久久久| www.久久热| 日韩人妻无码一区二区三区久久 | 亚洲欧美日韩中文久久| 精品久久久久久无码免费| 91视频国产91久久久| 国产精品久久新婚兰兰| 久久久久18| 久久久噜噜噜久久中文字幕色伊伊| 久久99热精品| 国产精品久久久久9999高清| 新狼窝色AV性久久久久久| 精品综合久久久久久98| 亚洲伊人久久成综合人影院 | 狠狠色丁香久久婷婷综合_中| 日韩精品久久久久久| 久久国产一区二区| 久久久久久狠狠丁香| 久久精品国产亚洲沈樵| 免费观看成人久久网免费观看| 亚洲国产精品久久久久| 国产精品99久久久久久www|