0
Under review

Multiplied UVs give an unexpected result

Ryan Gatts 6 ár síðan Uppfært 6 ár síðan 3

I've run into this bug in a couple different places (though never on my own machine) where a multiply node acting on a set of UV coordinates and constant seem to give much larger values than anticipated (in this case, the 2 is acting like something like 5.1 or so). 


Demo shader here (though, I'm not 100% sure if this is consistently reproable): https://drive.google.com/open?id=0B5ggkqBwi9B0MkdFRmdGZDN3Ylk


Unity 5.6.1f1, SF 1.37

Image 865

Any idea what this might be?

Answer

Answer
Under review

While this is a bug, it's likely just a visual one in the nodes themselves, so the shader is most likely unaffected. (Probably relating to gamma issues)

If it's happening to the shaders, it could be because you're using it in texture samplers, where you can also set the scale/offset values per-texture

Answer
Under review

While this is a bug, it's likely just a visual one in the nodes themselves, so the shader is most likely unaffected. (Probably relating to gamma issues)

If it's happening to the shaders, it could be because you're using it in texture samplers, where you can also set the scale/offset values per-texture

I can confirm that this sometimes results in actual incorrect UVs. I regularly use this offset in the first step of making a radial mask, and the UVs displayed in the node seem to be what is being used in the calculation ie. the remap has a correctly centered mask and the multiply has the mask in the lower left hand corner.

I have news! I have pictures of compiled code that works and doesn't work. It seems to be a problem with the piecewise math between a float 2 and a float.