0
Fixed

Incorrect number of arguments on Fresnel node

H92 9 years ago updated 9 years ago 7

Well...so I can't connect Fresnel multiplied with Color in Emission, and Fresnel in Opacity like in screen:


Image 490


I enclose also the full console error:


Shader error in 'Shader Forge/NewShader': incorrect number of arguments to numeric-type constructor at line 169 (on d3d11)



Compiling Vertex program with DIRECTIONAL SHADOWS_OFF LIGHTMAP_OFF DIRLIGHTMAP_OFF DYNAMICLIGHTMAP_OFF

Answer

+1
Answer
Fixed

This has now been fixed in 1.25, thanks for the help in spotting the issue!

No chance of fix?

Under review

I'll have to look into it, not sure what could be wrong

I think I found the error:


1.19 (working):

////// Emissive:
float node_1237 = (1.0-max(0,dot(normalDirection, viewDirection)));
float3 emissive = (_node_1172.rgb*node_1237);
float3 finalColor = emissive;
fixed4 finalRGBA = fixed4(finalColor,node_1237);
UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
return finalRGBA;
}



1.24 (not working):

////// Emissive:
float4 node_1237 = (1.0-max(0,dot(normalDirection, viewDirection)));
float3 emissive = (_node_1172.rgb*node_1237);
float3 finalColor = emissive;
fixed4 finalRGBA = fixed4(finalColor,node_1237);
UNITY_APPLY_FOG(i.fogCoord, finalRGBA);
return finalRGBA;
}

+1
Answer
Fixed

This has now been fixed in 1.25, thanks for the help in spotting the issue!

Thanks. However I think it would be easy to avoid these types of problems, with a set of advanced shaders for recompiling before each new release. What do you think about it? Can be helpful?

+1

I generally do it with all the example shaders at the moment

Then it could be very useful the shader that I created to simulate an approximate liquid in a cruet (maybe you have seen it). Thanks to this I was able to identify this problem :)


https://mega.nz/#!NZknhBSA!GNRwKPC0RQRv80Ovx9kvK6zEZxyA3lkUhntuvKR7fzI