Home
last modified time | relevance | path

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

/external/skia/src/effects/
DSkLightingImageFilter.cpp1869 SkString lightBody; in emitLightFunc() local
1870 lightBody.appendf("\tfloat colorScale = %s * dot(normal, surfaceToLight);\n", kd); in emitLightFunc()
1871 lightBody.appendf("\treturn vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);\n"); in emitLightFunc()
1876 lightBody.c_str(), in emitLightFunc()
1964 SkString lightBody; in emitLightFunc() local
1965 lightBody.appendf("\tvec3 halfDir = vec3(normalize(surfaceToLight + vec3(0, 0, 1)));\n"); in emitLightFunc()
1966 lightBody.appendf("\tfloat colorScale = %s * pow(dot(normal, halfDir), %s);\n", ks, shininess); in emitLightFunc()
1967 lightBody.appendf("\tvec3 color = lightColor * clamp(colorScale, 0.0, 1.0);\n"); in emitLightFunc()
1968 lightBody.appendf("\treturn vec4(color, max(max(color.r, color.g), color.b));\n"); in emitLightFunc()
1973 lightBody.c_str(), in emitLightFunc()