racz16 / WebGL-GLSL-Editor

WebGL GLSL shader editor extension for Visual Studio Code.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Color Picker - Option to not use the 'floating-point suffix'

Broccaaa opened this issue · comments

Please could we get an option for the Color Picker to not return the floating point suffixes?

These 'f' suffixes are not supported in all versions and so I need to manually delete them to get my frag shaders to compile correctly.

An option to simply return e.g. vec4(0.0, 1.0, 0.1, 1.0); instead of vec4(0.0f, 1.0f, 0.1f, 1.0f); would correct this issue for me.

Thanks!

Thank you for reporting the problem! I wasn't aware that some GLSL versions don't support the floating suffix, but you're right. I fixed the problem and added a configuration, so now the formatter and the color picker can take into consideration if you'd like to have floating suffixes or not (but it won't generate floating suffixes if they're unsupported, even if you enabled the configuration). This is the commit if you want to know what changed, or have any suggestions. This fix will be part of the next release which I plan to create this weekend.

Thanks for such a quick fix!

It's been a great tool so far and that was the only slight annoyance I'd encountered. Cheers!