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)
| 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) { |
no test coverage detected