X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=examples%2Fdeferred-shading%2Fdeferred-shading.cpp;h=a06f3f1ac3ac0a9592171a186729c38fabf41f51;hb=9d9a22fa08afb1572f4f66a02800c363df5ea219;hp=8e8324adef7235e97926b78afca9be4ca0cf11f1;hpb=708a5e016f973900a20a885914d3b70741fa80d9;p=platform%2Fcore%2Fuifw%2Fdali-demo.git diff --git a/examples/deferred-shading/deferred-shading.cpp b/examples/deferred-shading/deferred-shading.cpp index 8e8324a..a06f3f1 100644 --- a/examples/deferred-shading/deferred-shading.cpp +++ b/examples/deferred-shading/deferred-shading.cpp @@ -64,7 +64,7 @@ in vec3 aNormal; out vec4 vPosition; out vec3 vNormal; -vec4 Map(vec4 v) // projection space -> texture +vec4 Map(vec4 v) // projection space -> texture { return vec4(v.xyz / (2.f * v.w) + vec3(.5f), (v.w - NEAR) * INV_DEPTH); } @@ -149,7 +149,7 @@ uniform vec3 uDepth_InvDepth_Near;\n) // Light source uniforms struct Light { - vec3 position; // view space + vec3 position; // view space float radius; vec3 color; }; @@ -160,7 +160,7 @@ in vec2 vUv; out vec4 oColor; -vec4 Unmap(vec4 m) // texture -> projection +vec4 Unmap(vec4 m) // texture -> projection { m.w = m.w * DEPTH + NEAR; m.xyz = (m.xyz - vec3(.5)) * (2.f * m.w); @@ -180,10 +180,10 @@ vec3 CalculateLighting(vec3 pos, vec3 normal) rel /= distance; float a = uLights[i].radius / (kAttenuationConst + kAttenuationLinear * distance + - kAttenuationQuadratic * distance * distance); // attenuation + kAttenuationQuadratic * distance * distance); // attenuation - float l = max(0.f, dot(normal, rel)); // lambertian - float s = pow(max(0.f, dot(viewDirRefl, rel)), 256.f); // specular + float l = max(0.f, dot(normal, rel)); // lambertian + float s = pow(max(0.f, dot(viewDirRefl, rel)), 256.f); // specular light += (uLights[i].color * (l + s)) * a; } @@ -324,7 +324,7 @@ Geometry CreateTexturedQuadGeometry(bool flipV) std::swap(vertexData[1].aTexCoord, vertexData[3].aTexCoord); } - PropertyBuffer vertexBuffer = PropertyBuffer::New( Property::Map() + VertexBuffer vertexBuffer = VertexBuffer::New( Property::Map() .Add( "aPosition", Property::VECTOR3 ) .Add( "aTexCoord", Property::VECTOR2 ) ); vertexBuffer.SetData( vertexData, std::extent::value ); @@ -402,7 +402,7 @@ Geometry CreateOctahedron(bool invertNormals) } // Configure property buffers and create geometry. - PropertyBuffer vertexBuffer = PropertyBuffer::New(Property::Map() + VertexBuffer vertexBuffer = VertexBuffer::New(Property::Map() .Add("aPosition", Property::VECTOR3) .Add("aNormal", Property::VECTOR3)); vertexBuffer.SetData(vertexData, std::extent::value);