• <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>

            天行健 君子當自強而不息

                 摘要: Direct3D紋理對象生成后,紋理對象指針指向的紋理資源指針還沒有被有效賦值,如果想要通過磁盤圖形文件載入紋理,那么必須將磁盤圖形文件的內容載入Direct3D紋理資源,因為不同的文件具有不同的格式,所以為了將文件內容載入到Direct3D紋理資源,就要了解各種圖形文件的格式,并針對不同的格式編寫不同的代碼將文件內容載入到紋理資源中。

            從磁盤文件生成并載入紋理相當繁瑣,它涉及到各種圖形文件的存儲格式。幸運的是,Direct3D擴展實用庫函數D3DXCreateTextureFromFile()為我們提供了從磁盤圖形文件創建紋理并載入紋理內容的快捷方法。  閱讀全文
            posted @ 2008-05-05 14:20 lovedday 閱讀(1661) | 評論 (0)編輯 收藏
                 摘要: 為了使渲染的圖形看起來更真實,Direct3D提供了在物體表面繪制紋理的功能。一般說來,紋理是表示物體表面細節的一幅或幾幅二維圖形,也稱紋理貼圖(texture)。當把紋理按照特定的方式映射到物體表面的時候,能使物體看上去更加真實。當前流行的圖形系統中,紋理繪制已經成為一種必不可少的渲染方法。在理解紋理映射時,可以將紋理看作應用程序在物體表面的像素顏色。在真實世界中,紋理表示一個對象的顏色、圖案以及觸覺特征。但在Direct3D 中,紋理只表示對象表面的彩色圖案,它不能改變對象的幾何形式。更進一步說,它只是一種高強度計算行為。  閱讀全文
            posted @ 2008-05-05 13:43 lovedday 閱讀(2560) | 評論 (0)編輯 收藏
                 摘要: Ambient lighting provides constant lighting for a scene. It lights all object vertices the same because it is not dependent on any other lighting factors such as vertex normals, light direction, light position, range, or attenuation. It is the fastest type of lighting but it produces the least realistic results. Direct3D contains a single global ambient light property that you can use without creating any light. Alternatively, you can set any light object to provide ambient lighting.   閱讀全文
            posted @ 2008-05-05 11:44 lovedday 閱讀(1592) | 評論 (0)編輯 收藏
                 摘要: Emissive lighting is described by a single term.

            Emissive Lighting = Ce  閱讀全文
            posted @ 2008-05-05 11:42 lovedday 閱讀(713) | 評論 (0)編輯 收藏
                 摘要: Modeling specular reflection requires that the system not only know in what direction light is traveling, but also the direction to the viewer's eye. The system uses a simplified version of the Phong specular-reflection model, which employs a halfway vector to approximate the intensity of specular reflection.  閱讀全文
            posted @ 2008-05-05 11:10 lovedday 閱讀(931) | 評論 (0)編輯 收藏
                 摘要: After adjusting the light intensity for any attenuation effects, the lighting engine computes how much of the remaining light reflects from a vertex, given the angle of the vertex normal and the direction of the incident light. The lighting engine skips to this step for directional lights because they do not attenuate over distance. The system considers two reflection types, diffuse and specular, and uses a different formula to determine how much light is reflected for each. After calculating th  閱讀全文
            posted @ 2008-05-05 10:40 lovedday 閱讀(667) | 評論 (0)編輯 收藏
                 摘要: Ambient lighting provides constant lighting for a scene. It lights all object vertices the same because it is not dependent on any other lighting factors such as vertex normals, light direction, light position, range, or attenuation. It is the fastest type of lighting but it produces the least realistic results. Direct3D contains a single global ambient light property that you can use without creating any light. Alternatively, you can set any light object to provide ambient lighting. The ambient  閱讀全文
            posted @ 2008-05-05 10:02 lovedday 閱讀(1151) | 評論 (0)編輯 收藏
                 摘要: 在三維圖形程序中使用光照效果能夠有效地增強場景的真實感。在Direct3D中,通過計算場景中的光線和物體表面材質反射光線顏色的數學交互,可使光線模型接近于真實世界的照明系統。

            在真實世界中,光線在到達眼睛之前經過了物體表面的多次反射,每次反射時,物體表面都會吸收一些光,有些被隨機反射擴散出去,其余的到達下一個物體的表面或眼睛。真實世界中光線反射的效果就是光線跟蹤算法需要模擬實現的。盡管光線跟蹤算法能夠創建非常逼真的與自然界中觀察到極為相似的景象,但是還沒有實時程序能夠完成這些運算??紤]到實時渲染的需要,Direct3D使用更簡單的方法進行光照計算。Direct3D光照計算模型包括4種:環境光、漫反射光、鏡面反射光和自發光。它們的結合能靈活高效地解決三維圖形程序中的光照問題。  閱讀全文
            posted @ 2008-05-05 09:32 lovedday 閱讀(1967) | 評論 (0)編輯 收藏
                 摘要: 在示例程序MultiLights中一共使用了三個光源,分別是漫反射方向光光源、漫反射點光源、鏡面反射方向光光源,而且可以控制分別使用三個光源和同時使用三個光源的顯示效果。為了測試不同光源的光照效果,在示例程序中通過鍵盤上的數字鍵來控制3個光源的啟用。  閱讀全文
            posted @ 2008-05-04 16:05 lovedday 閱讀(986) | 評論 (0)編輯 收藏
                 摘要: 在程序中可以根據需要按以下步驟添加光照效果:

            (1)激活光照運算。

            (2)設置物體表面材質。材質屬性是針對整個圖形系統的,如果場景中的物體具有不同的材質屬性,在渲染物體前要分別設置其材質屬性。

            (3)設置光源。Direct3D在一個場景中最多支持8個光源,對每個設置好的光源還要設置是否啟用。  閱讀全文
            posted @ 2008-05-04 14:59 lovedday 閱讀(678) | 評論 (0)編輯 收藏
            僅列出標題
            共136頁: First 7 8 9 10 11 12 13 14 15 Last 

            公告

            導航

            統計

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關鏈接

            搜索

            最新評論

            久久久久久久综合日本| 欧美久久天天综合香蕉伊| 无码日韩人妻精品久久蜜桃| 99久久99久久精品国产片果冻| 午夜精品久久久久久中宇| 伊人久久精品线影院| 亚洲精品午夜国产VA久久成人| 99精品久久精品| 久久久久久国产精品无码下载 | 伊色综合久久之综合久久| 欧美喷潮久久久XXXXx| 91亚洲国产成人久久精品| 久久久久波多野结衣高潮| 亚洲午夜久久久精品影院| 人妻少妇久久中文字幕| 国内精品久久久久影院老司| 久久夜色精品国产亚洲| 久久综合亚洲欧美成人| 性做久久久久久久久久久| 91超碰碰碰碰久久久久久综合| 色欲综合久久中文字幕网 | 一本一本久久aa综合精品| 国产精品久久波多野结衣| 国产毛片欧美毛片久久久| 久久精品国产72国产精福利| 国产亚洲欧美成人久久片| 国内精品久久久久影院薰衣草| 久久久久久亚洲精品不卡| 狠狠色伊人久久精品综合网 | 久久青青草原亚洲av无码app| 日韩AV毛片精品久久久| 国产伊人久久| 国产精品综合久久第一页| 国产99久久九九精品无码| 久久综合九色综合97_久久久| 久久精品蜜芽亚洲国产AV| 欧美午夜精品久久久久免费视 | 久久综合噜噜激激的五月天| 久久人人青草97香蕉| 亚洲欧美成人久久综合中文网| 久久国产视频99电影|