Create a filter that calculates the diffuse illumination from a distant light source, interpreting the alpha channel of the input as the height profile of the surface (to approximate normal vectors). @param x The direction to the distance light (X component) @param y The dir
(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable Rect crop)
| 861 | * @return filter that applies distant diffuse lighting |
| 862 | */ |
| 863 | @NotNull @Contract("_, _, _, _, _, _, _, _ -> new") |
| 864 | public static ImageFilter makeDistantLitDiffuse(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable Rect crop) { |
| 865 | try { |
| 866 | Stats.onNativeCall(); |
| 867 | return new ImageFilter(_nMakeDistantLitDiffuse(x, y, z, lightColor, surfaceScale, kd, Native.getPtr(input), crop)); |
| 868 | } finally { |
| 869 | ReferenceUtil.reachabilityFence(input); |
| 870 | } |
| 871 | } |
| 872 | |
| 873 | @NotNull @Contract("_, _, _, _, _, _, _, _ -> new") |
| 874 | public static ImageFilter makeDistantLitDiffuse(float x, float y, float z, int lightColor, float surfaceScale, float kd, @Nullable ImageFilter input, @Nullable IRect crop) { |
no test coverage detected