@runevision@mastodon.gamedev.place
Post #2156511
2026-03-30 18:02 UTC
@thomastc I did think about using the second derivative (curvature), but then every function involved in producing the input height has to return those second order derivatives, or alternative it has to be done numerically which is either slow (multi-sampling) or rather inaccurate (shader derivatives). 2/?
Replies (1)
-
@runevision@mastodon.gamedev.place 2026-03-30 18:03
@thomastc On top of that, curvature does not produce a value that's between -1 and 1 as the fade target needs, so you'd have to combine it with other things (like first derivative) to wrangle it into a useful range. That's absolutely possible, but hand-tweaking the particulars may still be needed. So yeah I considered it but don't really have a good solution. I'm curious if others will find a better way to handle this. 3/3