Create a filter that calculates the diffuse illumination from a point light source, using alpha channel of the input as the height profile of the surface (to approximate normal vectors). @param x The location of the point light (X component) @param y The location of the poin
(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable Rect crop)
| 895 | * @return filter that applies point diffuse lighting |
| 896 | */ |
| 897 | @NotNull @Contract("_, _, _, _, _, _, _, _ -> new") |
| 898 | public static ImageFilter makePointLitDiffuse(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable Rect crop) { |
| 899 | try { |
| 900 | Stats.onNativeCall(); |
| 901 | return new ImageFilter(_nMakePointLitDiffuse(x, y, z, lightColor, surfaceScale, kd, Native.getPtr(input), crop)); |
| 902 | } finally { |
| 903 | ReferenceUtil.reachabilityFence(input); |
| 904 | } |
| 905 | } |
| 906 | |
| 907 | @NotNull @Contract("_, _, _, _, _, _, _, _ -> new") |
| 908 | public static ImageFilter makePointLitDiffuse(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable IRect crop) { |
no test coverage detected