yum-mirror/slang
Making it easier to work with shaders
git clone https://git.yummers.dev/yum-mirror/slang
5a11b47b3
master
1//TEST_IGNORE_FILE: 2 3// This file implements the "library" code 4// that both the HLSL and GLSL shaders share. 5// 6// This code is written in Slang (more or less 7// just HLSL), and will be translated as needed 8// for each of the targets. 9 10float3 transformColor(float3 color) 11{ 12 float3 result; 13 14 result.x = sin(20.0 * (color.x + color.y)); 15 result.y = saturate(cos(color.z * 30.0)); 16 result.z = sin(color.x * color.y * color.z * 100.0); 17 18 result = 0.5 * (result + 1); 19 20 return result; 21}