Can I suggest the make shadertoy documentation is amended to include a statement to the effect that the mouse position input is scaled by the width (or is it 1/2 the width?) to give the iMouse variables ... not necessarily obvious and tricky to track down since it is done behind ones back. The mouse position input is in Vuo coordinates and iMouse is pixel coordinates, just one (at least me) is not necessary expecting some scaling of node inputs.


Hmmm, the formula by which

pbourke's picture
Submitted by

Hmmm, the formula by which the MousePosition coordinate is transformed is (v+1)width/2 where v is the input to the MousePosition. One kind of needs to understand this to supply the reverse if one wants to use a known coordinate system within the shader.