1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[Unity] シェーダーで半透明のオブジェクトにするコード。[入門]

Posted at

######説明
画像の左にある通りオブジェクトを半透明にするシェーダーコードです。

スクリーンショット 2021-07-14 111426.png

Shader "Custom/sample"
{
	SubShader
	{
		Tags { "Queue" = "Transparent" }
		LOD 200


		CGPROGRAM
#pragma surface surf Standard alpha:fade
#pragma target 3.0


		struct Input
		{
			float2 uv_MainTex;
		};


		void surf(Input IN, inout SurfaceOutputStandard o)
		{
			o.Albedo = fixed4(0.6f,0.7f,0.4f,1);
			o.Alpha = 0.6f;
		}

		ENDCG
	}

	FallBack "Diffuse"
}
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?