[Linux] Alien vision shader is broken (patch included)
rkfg
Russia Join Date: 2013-09-03 Member: 187744Members, Reinforced - Supporter, Reinforced - Silver, Reinforced - Gold, Reinforced - Diamond, Reinforced - Shadow
tl;dr — patch is here
It seems that HLSL is translated to GLSL which uses the "mix" function instead of "lerp" (it does the same, interpolates between two values) but it doesn't automatically cast the parameters hence in the original shader it receives float4, float, float and it results in this vague message:
[ 45.275] Worker 10: Error: Compilation errors in shaders/DarkVision.hlsl
0(97): error C1115: unable to find compatible overloaded function "mix(vec4, float, vec4)"
Yes, GLSL sometimes thinks that float is a vector, it's not very clever. Help him by casting to the proper type then. Alien vision shaders aren't hash-checked so this hotfix might be applied right now by the user.
BTW, if you insert a colon with spaces around it in the forum message (like this : ), you'll get an annoying "smiles" popup everywhere AFTER that colon that won't go away. Please, fix it (I had to slightly edit the log message by sticking the colons to the text).
It seems that HLSL is translated to GLSL which uses the "mix" function instead of "lerp" (it does the same, interpolates between two values) but it doesn't automatically cast the parameters hence in the original shader it receives float4, float, float and it results in this vague message:
[ 45.275] Worker 10: Error: Compilation errors in shaders/DarkVision.hlsl
0(97): error C1115: unable to find compatible overloaded function "mix(vec4, float, vec4)"
Yes, GLSL sometimes thinks that float is a vector, it's not very clever. Help him by casting to the proper type then. Alien vision shaders aren't hash-checked so this hotfix might be applied right now by the user.
BTW, if you insert a colon with spaces around it in the forum message (like this : ), you'll get an annoying "smiles" popup everywhere AFTER that colon that won't go away. Please, fix it (I had to slightly edit the log message by sticking the colons to the text).
Comments
For code use