AmplifyCreations / AmplifyShaderEditor-Feedback

4 stars 0 forks source link

Square function aka Squared #309

Closed Dawie3565 closed 3 months ago

Dawie3565 commented 6 months ago

this function is set as vec4 input and users report returns odd results when use with float

please make it to a official node with dynamic input

also change name from Square to Squared

Tiber-Legacy commented 6 months ago

I'm personally not seeing any issues with this Function but I do think this would a good addition to ASE's default math nodes like how the One minus and Reciprocal Nodes are

diogovtx commented 3 months ago

this function is set as vec4 input and users report returns odd results when use with float

I don't see a problem with this function either. You'll need to be more specific about what "odd results" actually mean.

please make it to a official node with dynamic input

The input is configured with auto-cast and should correctly cast to float, float2 and float3.

Here's an example using float: B6tan7myJO And generating a correct output:

float temp_output_2_0_g1 = _Float0;
float3 temp_cast_0 = (( temp_output_2_0_g1 * temp_output_2_0_g1 )).xxx;
o.Albedo = temp_cast_0;

also change name from Square to Squared

That wouldn't be in line with the rest of our function names: "Add" shouldn't be "Added".

Dawie3565 commented 3 months ago

Squared is a math function Square is a shape

conflict in names