0
En revisión

float3 target lerp inputs need cast

Matt Smith hace 8 años actualizado por Freya Holmér (Developer) hace 8 años 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.

Respuesta

Respuesta
En revisión

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.

Respuesta
En revisión

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.