0
На рассмотрении

float3 target lerp inputs need cast

Matt Smith 8 лет назад обновлен Freya Holmér (Developer) 8 лет назад 1

I'm looking at some SF-generated code on PS4, where the resolution of ambiguity is pedantic:


float3 node_5569 = (lerp( (float3)node_5259, _FresnelGradientTex_var.rgb, _UseFresnelGradientTex )*_FresnelTint.rgb*_FresnelStrength);

...

outEmission = half4( lerp( 0.0, node_5569, _FresnelisEmissive ), 1 );

On PS4 this causes a warning since there's no lerp with the prototype (float, float3, float3).


I'm fixing these manually by explicitly casting:


outEmission = half4( lerp( (float3)0.0, node_5569, _FresnelisEmissive ), 1 );

but it's a bit of a pain since any new shaders need the treatment.

Ответ

Ответ
На рассмотрении

A halfway solution that skips the manual editing is to use the append node to append the float to itself three times, before going into the lerp node.

Ответ
На рассмотрении

A halfway solution that skips the manual editing is to use the append node to append the float to itself three times, before going into the lerp node.

Сервис поддержки клиентов работает на платформе UserEcho