Searched refs:lightBody (Results 1 – 1 of 1) sorted by relevance
/external/skia/src/effects/ |
D | SkLightingImageFilter.cpp | 1927 SkString lightBody; in emitLightFunc() local 1928 lightBody.appendf("\tfloat colorScale = %s * dot(normal, surfaceToLight);\n", kd); in emitLightFunc() 1929 lightBody.appendf("\treturn vec4(lightColor * clamp(colorScale, 0.0, 1.0), 1.0);\n"); in emitLightFunc() 1934 lightBody.c_str(), in emitLightFunc() 2026 SkString lightBody; in emitLightFunc() local 2027 lightBody.appendf("\tvec3 halfDir = vec3(normalize(surfaceToLight + vec3(0, 0, 1)));\n"); in emitLightFunc() 2028 lightBody.appendf("\thighp float colorScale = %s * pow(dot(normal, halfDir), %s);\n", in emitLightFunc() 2030 lightBody.appendf("\tvec3 color = lightColor * clamp(colorScale, 0.0, 1.0);\n"); in emitLightFunc() 2031 lightBody.appendf("\treturn vec4(color, max(max(color.r, color.g), color.b));\n"); in emitLightFunc() 2036 lightBody.c_str(), in emitLightFunc()
|