MCPcopy Create free account
hub / github.com/HumbleUI/Skija / makeSpotLitSpecular

Method makeSpotLitSpecular

shared/java/ImageFilter.java:1049–1057  ·  view source on GitHub ↗

Create a filter that calculates the specular illumination from a spot light source, using alpha channel of the input as the height profile of the surface (to approximate normal vectors). The spot light is restricted to be within 'cutoffAngle' of the vector between the location and target. @param x0

(float x0, float y0, float z0, float x1, float y1, float z1, float falloffExponent, float cutoffAngle, int lightColor, float surfaceScale, float ks, float shininess, @Nullable ImageFilter input, @Nullable Rect crop)

Source from the content-addressed store, hash-verified

1047 * @return filter that applies spot specular lighting
1048 */
1049 @NotNull @Contract("_, _, _, _, _, _, _, _, _, _, _, _, _, _ -> new")
1050 public static ImageFilter makeSpotLitSpecular(float x0, float y0, float z0, float x1, float y1, float z1, float falloffExponent, float cutoffAngle, int lightColor, float surfaceScale, float ks, float shininess, @Nullable ImageFilter input, @Nullable Rect crop) {
1051 try {
1052 Stats.onNativeCall();
1053 return new ImageFilter(_nMakeSpotLitSpecular(x0, y0, z0, x1, y1, z1, falloffExponent, cutoffAngle, lightColor, surfaceScale, ks, shininess, Native.getPtr(input), crop));
1054 } finally {
1055 ReferenceUtil.reachabilityFence(input);
1056 }
1057 }
1058
1059 @NotNull @Contract("_, _, _, _, _, _, _, _, _, _, _, _, _, _ -> new")
1060 public static ImageFilter makeSpotLitSpecular(float x0, float y0, float z0, float x1, float y1, float z1, float falloffExponent, float cutoffAngle, int lightColor, float surfaceScale, float ks, float shininess, @Nullable ImageFilter input, @Nullable IRect crop) {

Callers 1

drawLightsMethod · 0.95

Calls 4

onNativeCallMethod · 0.95
_nMakeSpotLitSpecularMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected