ShaderSimpler(3) : 卡通渲染

來源:互聯網
上載者:User

    CSDN blog問題百出,圖片插不進來,真讓人鬱悶!今天總算能連上google page了,繼續上傳shader simpler源碼。

    源碼:http://yanonsoftware.googlepages.com/ShaderSimpler.zip

    卡通渲染(cartoon render,cel-shading)主要包括兩個效果:
    1、把普通光照的平滑亮度變化變成幾個強度層級。這是通過計算出光照強調,然後尋找一個貼圖來實現的,此貼圖儲存0~1的4個固定段。
    2、描出輪廓線。法線與視線垂直的點為輪廓,所以使用兩者的點積結果來尋找一個貼圖,然後乘以光照顏色來實現描邊,此貼圖0附近為全黑,其餘為全擺。

參考:
Keith Lee, Cartoon Rendering with HLSL, http://www.booyah.com/article05-dx9.html
DX9SDK simple, BasicHLSL
 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.