playcanvas
Version:
PlayCanvas WebGL game engine
3 lines (2 loc) • 648 B
TypeScript
declare const _default: "\n #ifdef FRINGING\n uniform fringingIntensity: f32;\n\n fn applyFringing(color: vec3f, uv: vec2f) -> vec3f {\n // offset depends on the direction from the center\n let centerDistance = uv - 0.5;\n let offset = uniform.fringingIntensity * pow(centerDistance, vec2f(2.0));\n\n var colorOut = color;\n colorOut.r = textureSample(sceneTexture, sceneTextureSampler, uv - offset).r;\n colorOut.b = textureSample(sceneTexture, sceneTextureSampler, uv + offset).b;\n return colorOut;\n }\n #endif\n";
export default _default;