Use flat keyword for some shader 27/317227/2
authorEunki, Hong <eunkiki.hong@samsung.com>
Fri, 6 Sep 2024 04:23:57 +0000 (13:23 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Mon, 9 Sep 2024 02:29:40 +0000 (11:29 +0900)
Since some varying value what we using now don't need to be interpolated.

So let we use some flat keyword if we can.

Change-Id: If29b39d82d0b413f27cd0d7c327a94f245d37b75
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali-scene3d/internal/graphics/shaders/scene3d-joint-debug.frag
dali-scene3d/internal/graphics/shaders/scene3d-joint-debug.vert
dali-toolkit/internal/graphics/shaders/color-visual-shader.frag
dali-toolkit/internal/graphics/shaders/color-visual-shader.vert
dali-toolkit/internal/graphics/shaders/gradient-visual-shader.frag
dali-toolkit/internal/graphics/shaders/gradient-visual-shader.vert
dali-toolkit/internal/graphics/shaders/image-visual-shader.frag
dali-toolkit/internal/graphics/shaders/image-visual-shader.vert

index 5e6f766c03dab13596d4f27a9ffd9932e74d3fb5..3ce016bd7b3fa0eb595e5f08f80e67c1ba5d659d 100644 (file)
@@ -1,7 +1,7 @@
 
 precision mediump float;
 uniform lowp vec4 uColor;
-flat INPUT float vColor;
+FLAT INPUT float vColor;
 
 void main()
 {
index 5e9d9656b3623fd09a485fc736c59bff59308efa..49860c8a275fccb1b4e414c2a97521eebbdc7cb6 100644 (file)
@@ -3,7 +3,7 @@ precision mediump float;
 uniform mat4 uMvpMatrix;
 INPUT vec3 aPosition;
 INPUT float aColor;
-flat OUTPUT float vColor;
+FLAT OUTPUT float vColor;
 
 void main()
 {
index e9d5c0e359aa2d8bbbdd5ec3e4969a55454124f6..e4fae386d31a66a5d29a84d6ebe4a3fe15589414 100644 (file)
@@ -1,20 +1,19 @@
 #if defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE) || defined(IS_REQUIRED_BLUR)
 INPUT highp vec2 vPosition;
-INPUT highp vec2 vRectSize;
-INPUT highp vec2 vOptRectSize;
-INPUT highp float vAliasMargin;
+FLAT INPUT highp vec2 vRectSize;
+FLAT INPUT highp vec2 vOptRectSize;
+FLAT INPUT highp float vAliasMargin;
 #ifdef IS_REQUIRED_ROUNDED_CORNER
-INPUT highp vec4 vCornerRadius;
+FLAT INPUT highp vec4 vCornerRadius;
 #endif
 #endif
 #if defined(IS_REQUIRED_CUTOUT)
 INPUT highp vec2 vPositionFromCenter;
 #if defined(IS_REQUIRED_ROUNDED_CORNER)
-INPUT highp vec4 vCutoutCornerRadius;
+FLAT INPUT highp vec4 vCutoutCornerRadius;
 #endif
 #endif
 
-uniform highp vec3 uSize;
 uniform lowp vec4 uColor;
 uniform lowp vec3 mixColor;
 #ifdef IS_REQUIRED_BLUR
@@ -27,6 +26,7 @@ uniform lowp vec4 uActorColor;
 #endif
 
 #if defined(IS_REQUIRED_CUTOUT)
+uniform highp vec3 uSize;
 uniform lowp int uCutoutWithCornerRadius;
 #endif
 
index 223de2251c1e1844d17c9854d0a3f3ef89241161..0e022793077a2dfaf0b8c0a8e451faa65b472527 100644 (file)
@@ -1,17 +1,17 @@
 INPUT mediump vec2 aPosition;
 #if defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE) || defined(IS_REQUIRED_BLUR)
 OUTPUT highp vec2 vPosition;
-OUTPUT highp vec2 vRectSize;
-OUTPUT highp vec2 vOptRectSize;
-OUTPUT highp float vAliasMargin;
+FLAT OUTPUT highp vec2 vRectSize;
+FLAT OUTPUT highp vec2 vOptRectSize;
+FLAT OUTPUT highp float vAliasMargin;
 #ifdef IS_REQUIRED_ROUNDED_CORNER
-OUTPUT highp vec4 vCornerRadius;
+FLAT OUTPUT highp vec4 vCornerRadius;
 #endif
 #endif
 #if defined(IS_REQUIRED_CUTOUT)
 OUTPUT highp vec2 vPositionFromCenter;
 #if defined(IS_REQUIRED_ROUNDED_CORNER)
-OUTPUT highp vec4 vCutoutCornerRadius;
+FLAT OUTPUT highp vec4 vCutoutCornerRadius;
 #endif
 #endif
 
index 0a574ce28e7e5cdd0544c85c7891d3c94bb7922e..73d0a735401bfd25ce2636486ae1f46ae85be6f1 100644 (file)
@@ -1,11 +1,11 @@
 INPUT mediump vec2 vTexCoord;
 #if defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE)
 INPUT highp vec2 vPosition;
-INPUT highp vec2 vRectSize;
-INPUT highp vec2 vOptRectSize;
-INPUT highp float vAliasMargin;
+FLAT INPUT highp vec2 vRectSize;
+FLAT INPUT highp vec2 vOptRectSize;
+FLAT INPUT highp float vAliasMargin;
 #ifdef IS_REQUIRED_ROUNDED_CORNER
-INPUT highp vec4 vCornerRadius;
+FLAT INPUT highp vec4 vCornerRadius;
 #endif
 #endif
 
index 54f042b6b2df5d625c92a92b66984bf1af82910e..95feb12b7ede892e4ced084b853aef06408d3598 100644 (file)
@@ -2,11 +2,11 @@ INPUT mediump vec2 aPosition;
 OUTPUT mediump vec2 vTexCoord;
 #if defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE)
 OUTPUT highp vec2 vPosition;
-OUTPUT highp vec2 vRectSize;
-OUTPUT highp vec2 vOptRectSize;
-OUTPUT highp float vAliasMargin;
+FLAT OUTPUT highp vec2 vRectSize;
+FLAT OUTPUT highp vec2 vOptRectSize;
+FLAT OUTPUT highp float vAliasMargin;
 #ifdef IS_REQUIRED_ROUNDED_CORNER
-OUTPUT highp vec4 vCornerRadius;
+FLAT OUTPUT highp vec4 vCornerRadius;
 #endif
 #endif
 
index bf9f787782548f08a2b579f399aaa820d59c0615..81d3e730c26ca0376b5a7a65d5a7337b15a03db7 100644 (file)
@@ -1,11 +1,11 @@
 INPUT mediump vec2 vTexCoord;
 #if defined(IS_REQUIRED_DEBUG_VISUAL_SHADER) || defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE)
 INPUT highp vec2 vPosition;
-INPUT highp vec2 vRectSize;
-INPUT highp vec2 vOptRectSize;
-INPUT highp float vAliasMargin;
+FLAT INPUT highp vec2 vRectSize;
+FLAT INPUT highp vec2 vOptRectSize;
+FLAT INPUT highp float vAliasMargin;
 #ifdef IS_REQUIRED_ROUNDED_CORNER
-INPUT highp vec4 vCornerRadius;
+FLAT INPUT highp vec4 vCornerRadius;
 #endif
 #endif
 #ifdef IS_REQUIRED_DEBUG_VISUAL_SHADER
index 187b6dd269f0bd588fa3835e8af51424937b9b14..8885cf771f4d9abc299378414e3d6845222b8f86 100644 (file)
@@ -2,11 +2,11 @@ INPUT mediump vec2 aPosition;
 OUTPUT mediump vec2 vTexCoord;
 #if defined(IS_REQUIRED_DEBUG_VISUAL_SHADER) || defined(IS_REQUIRED_ROUNDED_CORNER) || defined(IS_REQUIRED_BORDERLINE)
 OUTPUT highp vec2 vPosition;
-OUTPUT highp vec2 vRectSize;
-OUTPUT highp vec2 vOptRectSize;
-OUTPUT highp float vAliasMargin;
+FLAT OUTPUT highp vec2 vRectSize;
+FLAT OUTPUT highp vec2 vOptRectSize;
+FLAT OUTPUT highp float vAliasMargin;
 #ifdef IS_REQUIRED_ROUNDED_CORNER
-OUTPUT highp vec4 vCornerRadius;
+FLAT OUTPUT highp vec4 vCornerRadius;
 #endif
 #endif