mirror of
https://github.com/photonstorm/phaser
synced 2024-11-28 07:31:11 +00:00
Removed backticks so it can build the dist file.
This commit is contained in:
parent
34fa7b7059
commit
a735709684
1 changed files with 35 additions and 27 deletions
|
@ -1,35 +1,43 @@
|
|||
module.exports = {
|
||||
vert: `
|
||||
precision mediump float;
|
||||
uniform mat4 u_view_matrix;
|
||||
var ParticleShader = function ()
|
||||
{
|
||||
var vert = [
|
||||
'precision mediump float;',
|
||||
'uniform mat4 u_view_matrix;',
|
||||
|
||||
attribute vec2 a_position;
|
||||
attribute vec2 a_tex_coord;
|
||||
attribute vec4 a_color;
|
||||
'attribute vec2 a_position;',
|
||||
'attribute vec2 a_tex_coord;',
|
||||
'attribute vec4 a_color;',
|
||||
|
||||
varying vec4 v_color;
|
||||
varying vec2 v_tex_coord;
|
||||
'varying vec4 v_color;',
|
||||
'varying vec2 v_tex_coord;',
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_view_matrix * vec4(a_position, 1.0, 1.0);
|
||||
'void main()',
|
||||
'{',
|
||||
' gl_Position = u_view_matrix * vec4(a_position, 1.0, 1.0);',
|
||||
|
||||
v_color = a_color;
|
||||
v_tex_coord = a_tex_coord;
|
||||
}
|
||||
`,
|
||||
frag: `
|
||||
precision mediump float;
|
||||
' v_color = a_color;',
|
||||
' v_tex_coord = a_tex_coord;',
|
||||
'}'
|
||||
];
|
||||
|
||||
uniform sampler2D u_main_sampler;
|
||||
var frag = [
|
||||
'precision mediump float;',
|
||||
|
||||
varying vec4 v_color;
|
||||
varying vec2 v_tex_coord;
|
||||
'uniform sampler2D u_main_sampler;',
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = texture2D(u_main_sampler, v_tex_coord) * v_color;
|
||||
}
|
||||
'varying vec4 v_color;',
|
||||
'varying vec2 v_tex_coord;',
|
||||
|
||||
`
|
||||
};
|
||||
'void main()',
|
||||
'{',
|
||||
' gl_FragColor = texture2D(u_main_sampler, v_tex_coord) * v_color;',
|
||||
'}'
|
||||
];
|
||||
|
||||
return {
|
||||
vert: vert.join('\n'),
|
||||
frag: frag.join('\n')
|
||||
};
|
||||
};
|
||||
|
||||
module.exports = ParticleShader();
|
||||
|
|
Loading…
Reference in a new issue