unity shader 关于clip 溶解

35 篇文章 4 订阅

小于0才会被clip掉
if(value < 0)
discard

clip(smoothstepResult31 - 0.5);

float noise = SAMPLE_TEXTURE2D(_Noise, sampler_Noise, i.noiseUV).r + 1;

float temp_output_18_0 = ( _Dissolve * ( 1.0 + _Edge ) );
float temp_output_22_0 = ( 1.0 - _hardness );
float vertexToFrag27 = ( ( temp_output_18_0 - _Edge ) * ( 1.0 + temp_output_22_0 ) );

float vertexToFrag26 = ( temp_output_18_0 * ( 1.0 + temp_output_22_0 ) );

float smoothstepResult30 = smoothstep( _hardness , 1.0 , ( noise - vertexToFrag26 ));

float smoothstepResult31 = smoothstep( _hardness , 1.0 , ( noise - vertexToFrag27));

float4 lerpResult13 = lerp( _Edge_Color , diff , smoothstepResult30);
clip(smoothstepResult31 - 0.5);
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值