-/*
-SHADER_DEFINE( shader_ball,
- // VERTEX
- "layout (location=0) in vec2 a_co;"
- "uniform vec2 uOffset;"
- "uniform mat3 uPv;"
- ""
- "out vec2 aTexCoords;"
- ""
- "void main()"
- "{"
- // Create texture coords
- "aTexCoords = a_co;"
-
- // Vertex transform
- "vec3 worldpos = vec3( a_co * 0.5 - 0.25 + uOffset, 1.0 );"
- "gl_Position = vec4( uPv * worldpos, 1.0 );"
- "}",
-
- // FRAGMENT
- "out vec4 FragColor;"
- ""
- "uniform sampler2D uTexMain;"
- "uniform vec3 uColour;"
- ""
- "in vec2 aTexCoords;"
- ""
- "void main()"
- "{"
- "vec4 glyph = texture( uTexMain, aTexCoords );"
- "FragColor = vec4( uColour + glyph.rgb * 0.2, glyph.a );"
- "}"
- ,
- UNIFORMS({ "uTexMain", "uColour", "uOffset", "uPv" })
-)
-*/
-