Platform based Shaders

The API allows the creation of Shader objects from within Lua. The ‘’ constructor takes five arguments:

Gideros will search the assets for a file with the supplied name, automatically adding the extension relevant for the target platform: .glsl for OpenGL, .cso or .hlsl for DirectX. The Flag 'Shader.FLAG_FROM_CODE' can be used to let Gideros know that the string is actually Shader code, not contained within a file.