From: seungho Date: Mon, 16 May 2022 13:54:41 +0000 (+0900) Subject: Make highp for some variable for 3d model shader X-Git-Tag: dali_2.1.23~6^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=acf78c591ef90b114e316e90295218fe53b034cb;hp=83d145f1006f5e5309f660b3ec4e211eecaecf31;ds=sidebyside Make highp for some variable for 3d model shader Change-Id: Iecff23b041466ef4d9086989813da85715a2c115 Signed-off-by: seungho --- diff --git a/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.vert b/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.vert index f4778cb..2bae244 100644 --- a/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.vert +++ b/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.vert @@ -58,7 +58,7 @@ uniform int uBlendShapeComponentSize; ///< The siz void main() { - vec4 position = vec4(aPosition, 1.0); + highp vec4 position = vec4(aPosition, 1.0); vec3 normal = aNormal; vec3 tangent = aTangent.xyz; @@ -130,7 +130,7 @@ void main() #endif #ifdef SKINNING - mat4 bone = uBone[int(aJoints.x)] * aWeights.x + + highp mat4 bone = uBone[int(aJoints.x)] * aWeights.x + uBone[int(aJoints.y)] * aWeights.y + uBone[int(aJoints.z)] * aWeights.z + uBone[int(aJoints.w)] * aWeights.w; @@ -139,12 +139,12 @@ void main() tangent = (bone * vec4(tangent, 0.0)).xyz; #endif - vec4 positionW = uModelMatrix * position; - vec4 positionV = uViewMatrix * positionW; + highp vec4 positionW = uModelMatrix * position; + highp vec4 positionV = uViewMatrix * positionW; vPositionToCamera = transpose(mat3(uViewMatrix)) * -vec3(positionV.xyz / positionV.w); - lowp vec3 bitangent = cross(normal, tangent); + vec3 bitangent = cross(normal, tangent); #ifdef VEC4_TANGENT bitangent *= aTangent.w; #endif