If a Sine material graph node is attached to a uniform value (so it is constant and it can put in a preshader), the output is a float1, and not a float sized as the input.
Probably caused by FHLSLMaterialTranslator::Sine.
If a Sine material graph node is attached to a uniform value (so it is constant and it can put in a preshader), the output is a float1, and not a float sized as the input.
Probably caused by FHLSLMaterialTranslator::Sine.
Hello,
Thank you for reaching out.
I’ve been assigned this issue, and we will be looking into the behavior of MaterialExpressionSine for you.
Hello,
Thank you for your patience.
We are discussing this issue with our colleagues and will get back to you.
Hello,
The behavior of Sine Material Expression casting to float1 is intended behavior.
You can always use a Sine Material Expression per-channel, or use a Custom Material Expression to call sine() on a floatN constant.
Please let us know if this helps.
Sure. Thanks.
So, it should always cast to float1. sin(0.0,time) returns float2(sin(0),sin(time))
Hello,
The Sine Material Expression casts to a float1 when the input is a constant (uniform expression), and does not otherwise.
For more information, please see the definition in “FHLSLMaterialTranslator::Sine(…)” from HLSLMaterialTranslator.cpp, particularly, that the “CoerceParameter(…)” (cast) call is only made in the input is a Uniform Expression.
Please let us know if this helps.
Yes, I know. It seems a bit odd. Thanks.
Hello,
Thank you for the reply.
Can we close your case? You can always re-open it if you have additional questions about the same issue.