SPIRV-Cross/shaders-hlsl/frag/hyperbolic.frag
rdb 53974b4fae GLSL/HLSL: Add emulated fallbacks for sinh/cosh/tanh/asinh/acosh/atanh
The inverse hyperbolic functions are not supported in HLSL, and none of them are supported in legacy GLSL.
2023-01-26 19:40:42 +01:00

27 lines
506 B
GLSL

#version 450
layout(location=0) in float scalar;
layout(location=1) in vec3 vector;
layout(location=0) out vec4 result;
void main() {
result = vec4(1.0);
result.w *= sinh(scalar);
result.w *= cosh(scalar);
result.w *= tanh(scalar);
result.w *= asinh(scalar);
result.w *= acosh(scalar);
result.w *= atanh(scalar);
result.xyz *= sinh(vector);
result.xyz *= cosh(vector);
result.xyz *= tanh(vector);
result.xyz *= asinh(vector);
result.xyz *= acosh(vector);
result.xyz *= atanh(vector);
}