Skip to main content
DanHutchinson
Participant
February 10, 2022
Question

Exposing Parameters - Faster, Slower or No Difference?

  • February 10, 2022
  • 1 reply
  • 139 views

Hi All,

I recently had the idea to expose a HSL node via a float3 and use the X,Y and Z values via the empty function for each parameter Hue, Saturation and Luminosity, I was curious whether this made any performance impact vs exposing each parameter via it's own float1 which has always been the usual case of doing things.Visually using the float3 parameter looks far more appealing for the end-user.

I've attached an image for context on what I'm doing incase I haven't explained it enough.

Thank-you in advance.

Dan

This topic has been closed for replies.

1 reply

Luca Giarrizzo
Community Manager
Community Manager
February 10, 2022

Hello Dan,

 

The only performance difference I can think of would be the UI benefit of having to build only one widget for the Float3 instead of 3 widgets for each Float1 value, but even that is not noticeable unless you have a lot of parameters.

Regarding the execution of the function, the performance impact of one value call instead of three would not even register at this scale. That being said, using a Float3 in this context would be good practice, I think.

 

As a side note, it would be a different story if we were discussing texture samples. These can have a noticeable impact depending on the context (number of samples, resolution, bitdepth, ...). In this case, packing grayscale textures into the RGBA channels of a color texture is definitely recommended!

 

Best regards.

 

Luca Giarrizzo | Quality Engineer - Substance 3D Designer | Adobe