I have a shader it works good. The problem is that it's on my computer and I might port this to an iOS or Android device.
The thing is that on desktop it's things like:
in/out instead of attributes/varying (differences between GLSL and GLSL ES)
Sooo I feel like I need two different types of shaders.
I want to keep it simple and people expect things to run anywhere. Especially if it's a 2D game with some 3D effects.
What is the best course of action?
1. Have different shader files for different platforms.
2. Preprocessor defines for things like in/out and attributes/varying.
3. Something different like some kind of universal GLSL that basically compile different versions in the asset "baking" process.
Also is possible to define constants from the C++ code or is it easier to just prepend them to the GLSL source?