From 7c1563e3451aff131ea93fdf27d56b6985e61a31 Mon Sep 17 00:00:00 2001 From: Treer Date: Sun, 17 Jul 2022 00:45:18 +1000 Subject: [PATCH] Updates for testing improved saturation scale in ^[hsl and ^[colorizehsl see commit c1503136a5 in the minetest PR --- colorizehsl.lua | 6 ++++++ hsl.lua | 32 ++++++++++++++++++++++++++++++++ original_images.lua | 6 ++++++ out_of_bound_values.lua | 4 ++-- overlay_and_hardlight.lua | 6 ------ 5 files changed, 46 insertions(+), 8 deletions(-) diff --git a/colorizehsl.lua b/colorizehsl.lua index 0107c25..4c6095a 100644 --- a/colorizehsl.lua +++ b/colorizehsl.lua @@ -82,3 +82,9 @@ texturemodifiertest.create_node("colorizehsl", nil, 30, -70, -50) texturemodifiertest.create_node("colorizehsl", nil, 0, -70, -50) texturemodifiertest.create_node("colorizehsl", nil, -30, -70, -50) texturemodifiertest.create_node("colorizehsl", nil, -150, -70, -50) + +-- saturation above 100% (i.e. more than double) +texturemodifiertest.create_node("colorizehsl", nil, 0, 200) +texturemodifiertest.create_node("colorizehsl", nil, 0, 600) +texturemodifiertest.create_node("colorizehsl", nil, 30, 200) +texturemodifiertest.create_node("colorizehsl", nil, -30, 600) diff --git a/hsl.lua b/hsl.lua index 55bc164..dc8273e 100644 --- a/hsl.lua +++ b/hsl.lua @@ -82,3 +82,35 @@ texturemodifiertest.create_node("hsl", nil, 30, -70, -50) texturemodifiertest.create_node("hsl", nil, 0, -70, -50) texturemodifiertest.create_node("hsl", nil, -30, -70, -50) texturemodifiertest.create_node("hsl", nil, -150, -70, -50) + +minetest.register_node("texturemodifiertest:Fantasy_testimage_satPlus30", { + description = "Fantasy test image sat +30", + tiles = {"fantasy.png^[hsl:0:30:0"}, + groups = {cracky = 1, oddly_breakable_by_hand = 1}, +}) +minetest.register_node("texturemodifiertest:Fantasy_testimage_satPlus60", { + description = "Fantasy test image sat +60", + tiles = {"fantasy.png^[hsl:0:60:0"}, + groups = {cracky = 1, oddly_breakable_by_hand = 1}, +}) +minetest.register_node("texturemodifiertest:Fantasy_testimage_satPlus90", { + description = "Fantasy test image sat +90", + tiles = {"fantasy.png^[hsl:0:90"}, + groups = {cracky = 1, oddly_breakable_by_hand = 1}, +}) +minetest.register_node("texturemodifiertest:Fantasy_testimage_satPlus200", { + description = "Fantasy test image sat +200", + tiles = {"fantasy.png^[hsl:0:200:0"}, + groups = {cracky = 1, oddly_breakable_by_hand = 1}, +}) +minetest.register_node("texturemodifiertest:Fantasy_testimage_satPlus300", { + description = "Fantasy test image sat +300", + tiles = {"fantasy.png^[hsl:0:300:0"}, + groups = {cracky = 1, oddly_breakable_by_hand = 1}, +}) +minetest.register_node("texturemodifiertest:Fantasy_testimage_satPlus1000", { + description = "Fantasy test image sat +1000", + tiles = {"fantasy.png^[hsl:0:1000:0"}, + groups = {cracky = 1, oddly_breakable_by_hand = 1}, +}) + diff --git a/original_images.lua b/original_images.lua index c82bfa6..a591d5d 100644 --- a/original_images.lua +++ b/original_images.lua @@ -9,3 +9,9 @@ minetest.register_node("texturemodifiertest:gradient", { tiles = {"gradient.png"}, groups = {cracky = 1, oddly_breakable_by_hand = 1}, }) + +minetest.register_node("texturemodifiertest:Fantasy_testimage", { + description = "Fantasy test image unmodified", + tiles = {"fantasy.png"}, + groups = {cracky = 1, oddly_breakable_by_hand = 1}, +}) diff --git a/out_of_bound_values.lua b/out_of_bound_values.lua index 2784226..3ce44de 100644 --- a/out_of_bound_values.lua +++ b/out_of_bound_values.lua @@ -3,14 +3,14 @@ -- Hue-Saturation-Lightness texturemodifiertest.create_node("hsl", "OOB", 181) texturemodifiertest.create_node("hsl", "OOB", -181) -texturemodifiertest.create_node("hsl", "OOB", 0, 101, -101) +texturemodifiertest.create_node("hsl", "OOB", 0, 1001, -101) -- saturation can now go as high as 1000% texturemodifiertest.create_node("hsl", "OOB", 0, -101, 101) texturemodifiertest.create_node("hsl", "OOB", 10000, 10000, 10000) -- Colorize texturemodifiertest.create_node("colorizehsl", "OOB", 181) texturemodifiertest.create_node("colorizehsl", "OOB", -181) -texturemodifiertest.create_node("colorizehsl", "OOB", 0, 101, -101) +texturemodifiertest.create_node("colorizehsl", "OOB", 0, 1001, -101) -- saturation can now go as high as 1000% texturemodifiertest.create_node("colorizehsl", "OOB", 0, -101, 101) texturemodifiertest.create_node("colorizehsl", "OOB", 10000, 10000, 10000) diff --git a/overlay_and_hardlight.lua b/overlay_and_hardlight.lua index 9e46085..f7815bf 100644 --- a/overlay_and_hardlight.lua +++ b/overlay_and_hardlight.lua @@ -31,12 +31,6 @@ minetest.register_node("texturemodifiertest:Hardlight_to_raise_contrast", { groups = {cracky = 1, oddly_breakable_by_hand = 1}, }) -minetest.register_node("texturemodifiertest:Fantasy_testimage", { - description = "Fantasy test image unmodified", - tiles = {"fantasy.png"}, - groups = {cracky = 1, oddly_breakable_by_hand = 1}, -}) - minetest.register_node("texturemodifiertest:Hardlight_to_raise_contrast_fantasy", { description = "Hard light blending an image with itself applys an s-curve effect that increases contrast without clipping", tiles = {"fantasy.png^[hardlight:fantasy.png"},