Is there any way to ignore the locale of the machine when formatting numbers? For example, always force the decimal separator to a "." rather than the "," in some parts of the world? .... without changing the system preferences of course.

Comments

Are you referring to the

jmcc's picture
Submitted by

Are you referring to the Format Number node? That node uses the system's locale. You can override it on a per-app basis (System Preferences > Language & Region, and click the Apps tab), but Vuo doesn't currently provide a way to change it beyond that.

Can you share why you want different formatting than the system provides? With more context about what you're trying to do, we might be able to provide more help.

Vuo's shader editor uses ISF

jmcc's picture
Submitted by

Vuo's shader editor uses ISF syntax, which differs a bit from standard GLSL. To get the width and height, use RENDERSIZE.x and RENDERSIZE.y. To sample from the input image, use IMG_NORM_PIXEL(Image, coordinate) (to sample in normalized coordinates) or IMG_PIXEL(Image, coordinate) (to sample in integer pixel coordinates).

Also, your shader begins with void mainImage(out vec4 fragColor, vec2 fragCoord) { … } — that's Shadertoy's dialect of GLSL, which isn't compatible with ISF GLSL. You'll need to use void main() { … }, get the current fragment coordinate using isf_FragNormCoord.xy (normalized coordinates) or gl_FragCoord.xy (integer pixel coordinates), and set the current fragment color using gl_FragColor = vec4(…);.

You can select View > Show GLSL/ISF Quick Reference to see an overview of the variables and functions available, including the ISF extensions. There's also documentation at https://doc.vuo.org/2.3.0/manual/turning-graphics-shaders-into-nodes.xhtml .