• <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 閱讀(1655) | 評論 (0)編輯 收藏
                 摘要: 為了使渲染的圖形看起來更真實,Direct3D提供了在物體表面繪制紋理的功能。一般說來,紋理是表示物體表面細節的一幅或幾幅二維圖形,也稱紋理貼圖(texture)。當把紋理按照特定的方式映射到物體表面的時候,能使物體看上去更加真實。當前流行的圖形系統中,紋理繪制已經成為一種必不可少的渲染方法。在理解紋理映射時,可以將紋理看作應用程序在物體表面的像素顏色。在真實世界中,紋理表示一個對象的顏色、圖案以及觸覺特征。但在Direct3D 中,紋理只表示對象表面的彩色圖案,它不能改變對象的幾何形式。更進一步說,它只是一種高強度計算行為。  閱讀全文
            posted @ 2008-05-05 13:43 lovedday 閱讀(2548) | 評論 (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 閱讀(1584) | 評論 (0)編輯 收藏
                 摘要: Emissive lighting is described by a single term.

            Emissive Lighting = Ce  閱讀全文
            posted @ 2008-05-05 11:42 lovedday 閱讀(709) | 評論 (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 閱讀(926) | 評論 (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 閱讀(662) | 評論 (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 閱讀(1147) | 評論 (0)編輯 收藏
                 摘要: 在三維圖形程序中使用光照效果能夠有效地增強場景的真實感。在Direct3D中,通過計算場景中的光線和物體表面材質反射光線顏色的數學交互,可使光線模型接近于真實世界的照明系統。

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

            (1)激活光照運算。

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

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

            公告

            導航

            統計

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關鏈接

            搜索

            最新評論

            久久久艹| 久久婷婷五月综合色99啪ak | 亚洲精品第一综合99久久 | 尹人香蕉久久99天天拍| 久久精品国产亚洲AV久| 蜜臀av性久久久久蜜臀aⅴ麻豆 | 久久久久女教师免费一区| 久久笫一福利免费导航| 99久久精品日本一区二区免费 | 一97日本道伊人久久综合影院| 波多野结衣久久精品| 精品久久一区二区三区| 久久免费视频一区| 精品精品国产自在久久高清| 亚洲人AV永久一区二区三区久久| 久久w5ww成w人免费| 久久久久久亚洲精品无码| 亚洲成色www久久网站夜月| 久久美女人爽女人爽| 国产A三级久久精品| 久久久久这里只有精品| 国产成年无码久久久久毛片| 亚洲欧洲精品成人久久曰影片 | 一本久久综合亚洲鲁鲁五月天亚洲欧美一区二区 | 国产成人久久激情91| 亚洲婷婷国产精品电影人久久| 久久精品成人国产午夜| 色欲久久久天天天综合网精品| 人妻无码久久精品| 久久91这里精品国产2020| 国产精品久久波多野结衣| 7777久久久国产精品消防器材| 久久综合伊人77777| 久久这里只有精品首页| 91精品国产高清91久久久久久| 国产69精品久久久久久人妻精品 | 日韩人妻无码精品久久久不卡 | 一本伊大人香蕉久久网手机| 亚洲AV无码久久寂寞少妇| 精品久久久久久中文字幕大豆网| 日韩欧美亚洲综合久久|