X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=blobdiff_plain;f=dali-scene-loader%2Finternal%2Fgraphics%2Fshaders%2Fdefault-physically-based-shader.frag;h=a55e9c3420e05085961e57c1631e54fd68f24b70;hp=3c295e32fbd2d20b0cd36bd722088f7ecf6be57e;hb=59d7a437c93f4864515c64d0aa3eacaebd293db6;hpb=8ab66eeb0aa2426c25a8eef360d4754fbecfe628 diff --git a/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.frag b/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.frag index 3c295e3..a55e9c3 100644 --- a/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.frag +++ b/dali-scene-loader/internal/graphics/shaders/default-physically-based-shader.frag @@ -64,10 +64,11 @@ uniform vec3 uEmissiveFactor; #endif //// For IBL +uniform sampler2D sbrdfLUT; uniform samplerCube sDiffuseEnvSampler; uniform samplerCube sSpecularEnvSampler; -uniform sampler2D sbrdfLUT; uniform float uIblIntensity; +uniform vec3 uYDirection; // For Alpha Mode. uniform lowp float uOpaque; @@ -201,8 +202,8 @@ void main() mediump vec3 reflection = -normalize(reflect(v, n)); lowp vec3 color = vec3(0.0); - lowp vec3 diffuseLight = linear(texture(sDiffuseEnvSampler, n).rgb); - lowp vec3 specularLight = linear(texture(sSpecularEnvSampler, reflection).rgb); + lowp vec3 diffuseLight = linear(texture(sDiffuseEnvSampler, n * uYDirection).rgb); + lowp vec3 specularLight = linear(texture(sSpecularEnvSampler, reflection * uYDirection).rgb); // retrieve a scale and bias to F0. See [1], Figure 3 lowp vec3 brdf = linear(texture(sbrdfLUT, vec2(NdotV, 1.0 - perceptualRoughness)).rgb);