コガネブログ

平日更新を目標に Unity や C#、Visual Studio、ReSharper などのゲーム開発アレコレを書いていきます

【Unity】三角形をピラミッド状に変更するシェーダを導入する

はじめに

http://www.shaderslab.com/demo-80---triangles-to-pyramids.html

この記事では上記のサイト様が公開されている
三角形をピラミッド状に変更するシェーダを導入する方法を紹介していきます

使用例

適用前

f:id:baba_s:20180812130001p:plain

適用後

f:id:baba_s:20180812130010p:plain

使い方

上記のシェーダファイルを Unity プロジェクトに追加します

f:id:baba_s:20180812130112p:plain

シェーダを使用したいオブジェクトのマテリアルの Shader を
「Custom/Geometry/Pyramids」に変更します

f:id:baba_s:20180812130128p:plain

マテリアルのパラメータを自由に変更します

f:id:baba_s:20180812130010p:plain

これで、シェーダを使用できます

関連記事