summaryrefslogtreecommitdiff
path: root/script-fu
diff options
context:
space:
mode:
Diffstat (limited to 'script-fu')
-rw-r--r--script-fu/3.x/przem-dramatic-light-3x.scm82
-rw-r--r--script-fu/changelog.md3
2 files changed, 85 insertions, 0 deletions
diff --git a/script-fu/3.x/przem-dramatic-light-3x.scm b/script-fu/3.x/przem-dramatic-light-3x.scm
new file mode 100644
index 0000000..81e3b46
--- /dev/null
+++ b/script-fu/3.x/przem-dramatic-light-3x.scm
@@ -0,0 +1,82 @@
+; przem-dramatic-light-3x Tworzy dramatyczne światło z góry, wysoki kontrast i teksturę.
+; Przmeysłąw R. Pietraszczyk
+; 2026-07-21
+; ver 2.260721-0
+
+
+(define (przem-dramatic-light-3x img drawable
+ )
+ ; hue-range
+ ; saturation-range
+ ; value-range
+ ; dulling
+ ; seed
+ (gimp-image-undo-group-start img)
+
+ ;; Duplicate layer for non-destructive workflow
+ (let* (
+ (base-layer (vector-ref drawable 0))
+ (light-layer (car (gimp-layer-copy base-layer TRUE)))
+ (contrast-layer (car (gimp-layer-copy base-layer TRUE)))
+ (grain-layer (car (gimp-layer-copy base-layer TRUE)))
+ (type (car (gimp-drawable-type-with-alpha base-layer)))
+
+ )
+ ;; Add layers
+ (gimp-image-insert-layer img light-layer 0 -1)
+ (gimp-image-insert-layer img contrast-layer 0 -1)
+ (gimp-image-insert-layer img grain-layer 0 -1)
+
+ (if (= type RGBA-IMAGE)
+ (gimp-drawable-desaturate layer DESATURATE-LIGHTNESS))
+ ;; Apply strong curves to push light from top
+ (let* ((finish-layer (car (gimp-layer-copy light-layer brightness-contrast TRUE)))
+ (gimp-drawable-curves-spline finish-layer HISTOGRAM-VALUE 6 #(0 0 64 180 128 230 255 255))
+ ;; Set blending mode
+ (gimp-layer-set-mode light-layer OVERLAY-MODE)
+ (gimp-layer-set-opacity finish-layer 85)
+
+ (gimp-drawable-curves-spline contrast-layer HISTOGRAM-VALUE 6 #(0 0 64 40 128 128 192 220 255 255))
+ ; neo grain- dissolve
+ (gimp-layer-set-mode light-layer DISSOLVE-MODE)
+ (gimp-layer-set-opacity finish-layer 70)
+ ))
+
+ ;(gegl:apply drawable
+ ; "noise-hsv"
+ ; (list
+ ; (cons "hue" hue-range)
+ ; (cons "saturation" saturation-range)
+ ;; (cons "value" value-range)
+ ; (cons "dulling" dulling)
+ ; (cons "seed" seed)))
+
+
+ (let* ((merged-layer (car (gimp-image-merge-visible-layers image CLIP-TO-IMAGE))))
+ ;(gimp-image-merge-visible-layers image CLIP-TO-IMAGE)
+ (gimp-item-set-visible merged-layer TRUE))
+ )
+
+ (gimp-image-undo-group-end img)
+ (gimp-displays-flush)
+)
+
+(script-fu-register "przem-dramatic-light-3x"
+ _"Dramatic Light Effect"
+ _"Tworzy dramatyczne światło z góry, wysoki kontrast i teksturę."
+ "Przemysław R. Pietraszczyk"
+ "Public Domain"
+ "21-07-2026"
+ "RGB* GRAY*"
+ SF-ONE-OR-MORE-DRAWABLE
+
+)
+(script-fu-menu-register "przem-dramatic-light-3x"
+ "<Image>/Filters/PIETRASZCZYK/")
+
+
+;SF-ADJUSTMENT _"Hue range" '(0.2 0 1 0.1 0.1 2 0)
+; SF-ADJUSTMENT _"Saturation range" '(0.2 0 1 0.1 0.1 2 0)
+; SF-ADJUSTMENT _"Value range" '(0.2 0 1 0.1 0.1 2 0)
+; SF-ADJUSTMENT _"Dulling" '(0.2 0 1 0.1 0.1 2 0)
+; SF-ADJUSTMENT _"Seed" '(1 1 10 1 1 0 0)
diff --git a/script-fu/changelog.md b/script-fu/changelog.md
index 8b2bfdf..7244383 100644
--- a/script-fu/changelog.md
+++ b/script-fu/changelog.md
@@ -1,3 +1,6 @@
+# [2.260721-0] przem-dramatic-light-3x.scm
+* Prealpha nowego filtra
+
# [2.260630-0]
* Połączenie linii filtrow dla wydań 3.0 i 3.2