Skip to content

buffet-ito/test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

しきい値調整シェーダ?

テクスチャのアルファ値を元に描画ピクセルをコントロールします。

Description

Unityのビルトインシェーダ「Sprites-Default」を一部変更して作成しました。

Source

fixed4 frag(v2f IN) : SV_Target
{
	fixed4 c = tex2D(_MainTex, IN.texcoord) * IN.color;
	float alpha = 1 - step(c.a, _threshold);
	c.rgb = IN.color.rgb * alpha;
	c.a = alpha;
	return c;
}

Demo

http://29jun2012-180156-6.businesscatalyst.com/unity/unity009/web.html sc

About

テスト

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors