Problem summary
An incorrect value is given when sampling the BlinkScript node with a float number as an exponent.
Customer reported version
nuke.12.2v5
Customer reported platform
centos7
Steps to reproduce
1) In Nuke, create a Constant node set to White, with a value greater than 10.
2) Create a BlinkScript node downstream of the Constant with the following kernel source, then click Recompile:
kernel TestKernel : ImageComputationKernel<ePixelWise>{ Image<eRead, eAccessPoint, eEdgeClamped> src; // the input image Image<eWrite> dst; // the output image void process() { // Read the input image SampleType(src) input = src(); // Isolate the RGB components float3 srcPixel(input.x, input.y, input.z); float3 outPixel; outPixel = pow(srcPixel.x, 2.4f); // Write the result to the output image dst() = float4(outPixel.x, outPixel.y, outPixel.z, input.w); }};
3) View the BlinkScript node, and observe the output in the Viewer by sampling a pixel with Ctrl+Left mouse-click.
Alternatively, compare the results using math.pow([value],2.4) - where [value] is the chosen number in step 1. Example Python in the Script Editor using the following snippet:
Expected behavior
The BlinkScript output value should output the same sample as the math value.
Actual behavior
An incorrect value is given when comparing the math results with exponentials greater than 10.
Workaround
There is no available workaround at this time.
Reproduced by Support in:
Nuke 13.1v3 - Windows 10, CentOS 7
Nuke 13.1v1 - Windows 10
Nuke 13.0v1 - Windows 10
Nuke 12.0v1 - Windows 10
Nuke 11.0v1 - Windows 10
Nuke 10.0v1 - Windows 10
Nuke 9.0v1 - Windows 10, CentOS 7
Earliest version tested
Nuke 9.0v1 - This issue appears to be in all versions of the product