UNPKG

playcanvas

Version:

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

16 lines (15 loc) 421 B
var compose_fringing_default = ` #ifdef FRINGING uniform float fringingIntensity; vec3 applyFringing(vec3 color, vec2 uv) { vec2 centerDistance = uv - 0.5; vec2 offset = fringingIntensity * centerDistance * centerDistance; color.r = texture2D(sceneTexture, uv - offset).r; color.b = texture2D(sceneTexture, uv + offset).b; return color; } #endif `; export { compose_fringing_default as default };