Constant CONTENT
Source pub const CONTENT: &str = "fn content_composite(surface: Shaded, blend: u32, texel: vec4f, ink_roughness: f32, strength: f32) -> Shaded {\n var out = surface;\n let a = clamp(texel.a, 0.0, 1.0);\n if (blend == 0u) {\n out.base = surface.base * (1.0 - a) + texel.rgb;\n out.emission = surface.emission * (1.0 - a);\n if (ink_roughness >= 0.0) {\n let alpha = surface.roughness * surface.roughness;\n out.roughness = sqrt(mix(alpha, ink_roughness * ink_roughness, a));\n }\n out.subsurface = surface.subsurface * pow(1.0 - a, 4.0);\n } else if (blend == 1u) {\n out.base = surface.base * (vec3f(1.0 - a) + texel.rgb * strength);\n } else if (blend == 2u) {\n out.emission = surface.emission + texel.rgb * strength;\n }\n return out;\n}\n\nfn content_uv(uv: vec2f, transform: vec4f) -> vec2f {\n return uv * transform.zw + transform.xy;\n}\n\nfn content_inside(at: vec2f, crop: vec4f) -> bool {\n return all(at >= crop.xy) && all(at <= crop.zw);\n}\n\nfn content_emboss(n: vec3f, t: vec3f, b: vec3f, gradient: vec2f, strength: f32) -> vec3f {\n let tilt = (t * gradient.x + b * gradient.y) * strength;\n return normalize(n - (tilt - dot(tilt, n) * n));\n}\n";