UNPKG

playcanvas

Version:

Open-source WebGL/WebGPU 3D engine for the web

3 lines (2 loc) 905 B
declare const _default: "\n\n#include \"decodePS\"\n\n#if (GAMMA == SRGB)\n\n fn gammaCorrectInput(color: f32) -> f32 {\n return decodeGammaFloat(color);\n }\n\n fn gammaCorrectInputVec3(color: vec3f) -> vec3f {\n return decodeGamma3(color);\n }\n\n fn gammaCorrectInputVec4(color: vec4f) -> vec4f {\n return vec4f(decodeGamma3(color.xyz), color.w);\n }\n\n fn gammaCorrectOutput(color: vec3f) -> vec3f {\n return pow(color + 0.0000001, vec3f(1.0 / 2.2));\n }\n\n#else // NONE\n\n fn gammaCorrectInput(color: f32) -> f32 {\n return color;\n }\n\n fn gammaCorrectInputVec3(color: vec3f) -> vec3f {\n return color;\n }\n\n fn gammaCorrectInputVec4(color: vec4f) -> vec4f {\n return color;\n }\n\n fn gammaCorrectOutput(color: vec3f) -> vec3f {\n return color;\n }\n\n#endif\n"; export default _default;