#ifdef FRAGMENT #version 300 es precision mediump float; precision highp int; uniform highp vec2 TextureOffset; uniform highp vec2 TextureSize; uniform highp vec2 RectangleSize; uniform highp float CornerRadius; uniform highp sampler2D SpriteTextureSampler; in highp vec4 v_Color; in highp vec2 v_TextureCoordinate; layout(location = 0) out highp vec4 entryPointParam_PS_RoundedCorners; void main() { entryPointParam_PS_RoundedCorners = (v_Color * texture(SpriteTextureSampler, v_TextureCoordinate)) * (1.0 - smoothstep(0.0, 1.0, length(max((abs(vec2((v_TextureCoordinate.x * TextureSize.x) - TextureOffset.x, (v_TextureCoordinate.y * TextureSize.y) - TextureOffset.y) - (RectangleSize * 0.5)) - (RectangleSize * vec2(0.5))) + vec2(CornerRadius), vec2(0.0))) - CornerRadius)); } #endif