Laplacian Edge Enhancement
Enhances image details by emphasizing edges through Laplacian filtering.
Parameters
texture
Texture: The input texture to be filtered. Default: The entire canvas
texOffset
Vec2: The offset used for sampling neighboring pixels. Default: (1.0 / width, 1.0 / height)
amount
Float: Controls the strength of the enhancement. Higher values result in more pronounced edges. Default: 1.5
Example
import fip.*;
PShader laplacianEdgeEnhancement;
PImage ireland;
void setup() {
size(1000, 1000, P3D);
laplacianEdgeEnhancement = loadShader(FIP.laplacianEdgeEnhancement);
ireland = loadImage("ireland.jpg");
laplacianEdgeEnhancement.set("amount", 1.5);
}
void draw() {
image(ireland, 0, 0, width, height);
filter(laplacianEdgeEnhancement);
}