Fix USER_SPACE coordinates to top-left origin in vertex shader. 04/324004/2
authorANZ1217 <chihun.jeong@samsung.com>
Mon, 12 May 2025 07:23:56 +0000 (16:23 +0900)
committerChihun Jeong <chihun.jeong@samsung.com>
Mon, 12 May 2025 07:38:55 +0000 (07:38 +0000)
Previously, USER_SPACE were only scaled by size, resulting center-origin layout,
(e.g., (-width/2, -height/2) to (+width/2, +height/2))
expected top-left (0, 0) origin defined int USER_SPACE mode.

Change-Id: Iac024eb28b622fb9f1477bc178975eed97c12e20

dali-toolkit/internal/graphics/shaders/gradient-visual-shader.vert

index 18a7c37f5bb4b17cfe6a0062f56ffdfa0182cecf..354383126931ab6aa44c4351ef29def127e9375c 100644 (file)
@@ -102,6 +102,7 @@ vec4 ComputeVertexPosition()
 #endif
 
 #ifdef USER_SPACE
+  vertexPosition.xyz += vec3(0.5);
   vertexPosition.xyz *= uSize;
 #endif