phaser/src/renderer/webgl/shaders/Graphics-vert.js

21 lines
442 B
JavaScript
Raw Normal View History

2020-10-28 17:39:54 +00:00
module.exports = [
'#define SHADER_NAME PHASER_GRAPHICS_VS',
'',
'precision mediump float;',
'',
'uniform mat4 uProjectionMatrix;',
'',
'attribute vec2 inPosition;',
2020-11-03 11:31:32 +00:00
'attribute vec4 inColor;',
2020-10-28 17:39:54 +00:00
'',
2020-11-03 11:31:32 +00:00
'varying vec4 outColor;',
2020-10-28 17:39:54 +00:00
'',
'void main ()',
'{',
' gl_Position = uProjectionMatrix * vec4(inPosition, 1.0, 1.0);',
2020-10-28 17:39:54 +00:00
'',
2020-11-03 11:31:32 +00:00
' outColor = inColor;',
2020-10-28 17:39:54 +00:00
'}',
''
].join('\n');