YOUR ACCOUNT

Login or Register to post new topics or replies
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
I'm not the most programming-savvy, so I'll just keep asking stupid LUA questions. smile:-p

Is there a more optimal way to clamp negative HDR values to zero (script attached below)?




[Side remark: FF Team? What about a native Clamp component?]

Clamp Negative Values.ffxml
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
xirja
Idididoll Forcabbage

Posts: 1698
Filters: 8
I haven't checked that attachment, but I think the regular Blend does. If not that, then the If. smile;)
_____________________________________________________

http://web.archive.org/web/2021062908...rjadesign/
_____________________________________________________
  Details E-Mail
Skybase
2D/3D Generalist

Posts: 4025
Filters: 76
Yeah my thoughts were a regular blend component just clamps values.
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Quote
I think the regular Blend does


Yes, but the "regular" Blend also clamps values greater than 1, due to its map inputs being LDR.

My script clamps negative values to zero, but does not clamp values greater than 1.

Edit: Dang! Totally forgot about the If component. If is way faster than the script. Thanks guys.

Edit 2: I retract my Clamp component request. Totally doable via If. smile:D
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail
inujima

Posts: 176
Filters: 26
Use Max component ! smile:D
  Details E-Mail
Crapadilla
lvl 52 Filter Weaver and Official "Filter Forge Seer"

Posts: 4365
Filters: 65
Yeah. For clamping to a custom range, Max>Min works great. Slightly faster than If>If. smile:)
--- Crapadilla says: "Damn you, stupid redundant feature requests!" ;)
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,533 Posts
+38 new in 30 days!

15,348 Topics
+73 new in year!

Create an Account

Online Users Last minute:

28 unregistered users.