Remove useless warning message for scene3d example 17/294017/2
authorEunki Hong <eunkiki.hong@samsung.com>
Fri, 9 Jun 2023 15:39:57 +0000 (00:39 +0900)
committerEunki Hong <eunkiki.hong@samsung.com>
Mon, 12 Jun 2023 01:28:29 +0000 (01:28 +0000)
Change-Id: I871bd9a5f3f93811e842f3593e7c67791a98a0ec
Signed-off-by: Eunki Hong <eunkiki.hong@samsung.com>
resources/shaders/dli_pbr.fsh
resources/shaders/dli_pbr.vsh

index 78a1b9e..8c542dd 100644 (file)
@@ -51,6 +51,7 @@ in vec2 vUV;
 in vec3 vNormal;
 in vec3 vTangent;
 in vec3 vViewVec;
+in vec4 vColor;
 
 out vec4 FragColor;
 
@@ -82,7 +83,7 @@ void main()
     discard;
   }
 #endif //ALPHA_TEST
-  vec3 albedoColor = albedoAlpha.rgb * uColor.rgb;
+  vec3 albedoColor = albedoAlpha.rgb * vColor.rgb * uColor.rgb;
 
   vec4 metalRoughness = texture(sMetalRoughness, vUV.st);
   float metallic = metalRoughness.METALLIC * uMetallicFactor;
@@ -91,7 +92,7 @@ void main()
   vec3 normalMap = texture(sNormal, vUV.st).rgb;
 #else  //THREE_TEX
   vec4 albedoMetal = texture(sAlbedoMetal, vUV.st);
-  vec3 albedoColor = albedoMetal.rgb * uColor.rgb;
+  vec3 albedoColor = albedoMetal.rgb * vColor.rgb * uColor.rgb;
   float metallic = albedoMetal.a * uMetallicFactor;
 
   vec4 normalRoughness = texture(sNormalRoughness, vUV.st);
index fbd5e44..92f6c29 100644 (file)
@@ -10,6 +10,7 @@ in vec3 aPosition;
 in vec2 aTexCoord;
 in vec3 aNormal;
 in vec3 aTangent;
+in vec4 aVertexColor;
 
 #ifdef MORPH
   uniform sampler2D sBlendShapeGeometry;
@@ -19,6 +20,7 @@ out vec2 vUV;
 out vec3 vNormal;
 out vec3 vTangent;
 out vec3 vViewVec;
+out vec4 vColor;
 
 
 uniform highp mat4 uMvpMatrix;
@@ -150,5 +152,7 @@ void main()
   vUV = aTexCoord;
 #endif
 
+  vColor = aVertexColor;
+
   vViewVec = viewPosition.xyz;
 }