automated snapshot

This commit is contained in:
sumi
2025-12-17 23:54:25 -06:00
parent 66df6a29ff
commit 57ad5d0d5e
3 changed files with 141 additions and 48 deletions

24
utils.go Normal file
View File

@@ -0,0 +1,24 @@
package main
import (
"math"
"github.com/gen2brain/raylib-go/raylib"
)
func clamp01(v float32) float32 {
if v < 0 {
return 0
}
if v > 1 {
return 1
}
return v
}
func GrayCurve(v, k float32) rl.Color {
v = float32(math.Pow(float64(clamp01(v)), float64(k))) // k < 1 boosts highlights, k > 1 boosts shadows
c := uint8(v * 255)
return rl.Color{R: c, G: c, B: c, A: 255}
}