Created
September 6, 2015 14:09
-
-
Save EsProgram/d06ec9ed65b2565e147f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Custom/BasicVF" { | |
Properties{ | |
_MainTex("Main",2D)="black"{} | |
} | |
SubShader{ | |
Lighting Off | |
Pass{ | |
CGPROGRAM | |
//UnityCG.cginc標準の頂点シェーダに処理を任せる | |
#pragma vertex vert_img | |
#pragma fragment frag | |
#include "UnityCG.cginc" | |
sampler2D _MainTex; | |
//ピクセルのテクスチャの色味のみを適用 | |
float4 frag(v2f_img i):COLOR{ | |
return tex2D(_MainTex,i.uv); | |
} | |
ENDCG | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
シンプルな頂点シェーダ・フラグメントシェーダの実装