From deebc64aa2da7b9fa9c7634cd6ad8a9a11076ac6 Mon Sep 17 00:00:00 2001 From: caizhitao Date: Tue, 14 Jan 2020 21:53:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=9C=86=E8=A7=92Effect?= =?UTF-8?q?=E7=9A=84=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/effects/sprite-round-corner-crop.effect | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/effects/sprite-round-corner-crop.effect b/assets/effects/sprite-round-corner-crop.effect index e894a2a..9b4b299 100644 --- a/assets/effects/sprite-round-corner-crop.effect +++ b/assets/effects/sprite-round-corner-crop.effect @@ -99,7 +99,7 @@ CCProgram fs %{ // 约束圆角半径范围在 [0.0, 0.5] float radius = clamp(0.0, 0.5, roundCornerRadius); - // 将纹理uv往左下偏移,实现偏移后的纹理中心点在 OpenGL 坐标系的原点 + // 将纹理uv往左上偏移,实现偏移后的坐标系原点在纹理中心 vec2 uv = v_uv0.xy - vec2(0.5, 0.5); // uv.x , uv.y : 为偏移后的的uv