You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently my game engine requires multiple function outputs to correctly apply and blend between different materials. So far I have just done this my creating multiple functions for each output, and duplicating a bunch of code so that they all work together. While I don't understand fidgets internals, it makes sense intuitively to me that there could be multiple outputs for functions. This would reduce code duplication and also probably make things faster since there could be shared simplifications. On the other hand, you don't usually want all of the outputs to be calculated with the same inputs or the same number of times (I evaluate the distance function 216x more than the material id and blending functions), so you should be able to choose which outputs you want to actually evaluate code for...
I have no idea how you would go about implementing this, but you seem to be some sort of programming wizard capable of writing functions that optimize themselves at runtime so I wouldn't be surprised if you found a way. Anyhow I wouldn't prioritize it too much since I'm already emulating multiple function outputs without too much difficulty (and the speed improvements might even be negligible in my use case)
The text was updated successfully, but these errors were encountered:
Take a look at #163 - it changes the trait Function to support arbitrary numbers of outputs.
(Shape remains a single-output abstraction on top of Function, since it's meant for SDFs specifically)
On the other hand, you don't usually want all of the outputs to be calculated with the same inputs or the same number of times (I evaluate the distance function 216x more than the material id and blending functions), so you should be able to choose which outputs you want to actually evaluate code for...
I have to think more about whether this makes sense; right now, there's no way to select which outputs are evaluated, since they're all baked into the math graph together.
Currently my game engine requires multiple function outputs to correctly apply and blend between different materials. So far I have just done this my creating multiple functions for each output, and duplicating a bunch of code so that they all work together. While I don't understand fidgets internals, it makes sense intuitively to me that there could be multiple outputs for functions. This would reduce code duplication and also probably make things faster since there could be shared simplifications. On the other hand, you don't usually want all of the outputs to be calculated with the same inputs or the same number of times (I evaluate the distance function 216x more than the material id and blending functions), so you should be able to choose which outputs you want to actually evaluate code for...
I have no idea how you would go about implementing this, but you seem to be some sort of programming wizard capable of writing functions that optimize themselves at runtime so I wouldn't be surprised if you found a way. Anyhow I wouldn't prioritize it too much since I'm already emulating multiple function outputs without too much difficulty (and the speed improvements might even be negligible in my use case)
The text was updated successfully, but these errors were encountered: