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

Method makeDistantLitSpecular

shared/java/ImageFilter.java:973–981  ·  view source on GitHub ↗

Create a filter that calculates the specular 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 di

(float x, float y, float z, int lightColor, float surfaceScale, float ks, float shininess, @Nullable ImageFilter input, @Nullable Rect crop)

Source from the content-addressed store, hash-verified

971 * @return filter that applies distant specular lighting
972 */
973 @NotNull @Contract("_, _, _, _, _, _, _, _, _ -> new")
974 public static ImageFilter makeDistantLitSpecular(float x, float y, float z, int lightColor, float surfaceScale, float ks, float shininess, @Nullable ImageFilter input, @Nullable Rect crop) {
975 try {
976 Stats.onNativeCall();
977 return new ImageFilter(_nMakeDistantLitSpecular(x, y, z, lightColor, surfaceScale, ks, shininess, Native.getPtr(input), crop));
978 } finally {
979 ReferenceUtil.reachabilityFence(input);
980 }
981 }
982
983 @NotNull @Contract("_, _, _, _, _, _, _, _, _ -> new")
984 public static ImageFilter makeDistantLitSpecular(float x, float y, float z, int lightColor, float surfaceScale, float ks, float shininess, @Nullable ImageFilter input, @Nullable IRect crop) {

Callers 1

drawLightsMethod · 0.95

Calls 4

onNativeCallMethod · 0.95
getPtrMethod · 0.95
reachabilityFenceMethod · 0.95

Tested by

no test coverage detected