playcanvas
Version:
PlayCanvas WebGL game engine
3 lines (2 loc) • 809 B
TypeScript
declare const _default: "\n\n#ifndef _DETAILMODES_INCLUDED_\n#define _DETAILMODES_INCLUDED_\n\nfn detailMode_mul(c1: vec3f, c2: vec3f) -> vec3f {\n return c1 * c2;\n}\n\nfn detailMode_add(c1: vec3f, c2: vec3f) -> vec3f {\n return c1 + c2;\n}\n\n// https://en.wikipedia.org/wiki/Blend_modes#Screen\nfn detailMode_screen(c1: vec3f, c2: vec3f) -> vec3f {\n return 1.0 - (1.0 - c1)*(1.0 - c2);\n}\n\n// https://en.wikipedia.org/wiki/Blend_modes#Overlay\nfn detailMode_overlay(c1: vec3f, c2: vec3f) -> vec3f {\n return mix(1.0 - 2.0 * (1.0 - c1)*(1.0 - c2), 2.0 * c1 * c2, step(c1, vec3f(0.5)));\n}\n\nfn detailMode_min(c1: vec3f, c2: vec3f) -> vec3f {\n return min(c1, c2);\n}\n\nfn detailMode_max(c1: vec3f, c2: vec3f) -> vec3f {\n return max(c1, c2);\n}\n\n#endif\n";
export default _default;