Home
last modified time | relevance | path

Searched refs:lightBody (Results 1 – 1 of 1) sorted by relevance

/external/skia/src/effects/
DSkLightingImageFilter.cpp1747 SkString lightBody; in emitLightFunc() local
1748 lightBody.appendf("\tfloat colorScale = %s * dot(normal, surfaceToLight);\n", kd); in emitLightFunc()
1749 lightBody.appendf("\treturn vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);\n"); in emitLightFunc()
1754 lightBody.c_str(), in emitLightFunc()
1838 SkString lightBody; in emitLightFunc() local
1839 lightBody.appendf("\tvec3 halfDir = vec3(normalize(surfaceToLight + vec3(0, 0, 1)));\n"); in emitLightFunc()
1840 lightBody.appendf("\tfloat colorScale = %s * pow(dot(normal, halfDir), %s);\n", ks, shininess); in emitLightFunc()
1841 lightBody.appendf("\tvec3 color = lightColor * clamp(colorScale, 0.0, 1.0);\n"); in emitLightFunc()
1842 lightBody.appendf("\treturn vec4(color, max(max(color.r, color.g), color.b));\n"); in emitLightFunc()
1847 lightBody.c_str(), in emitLightFunc()