mirror of
https://github.com/photonstorm/phaser
synced 2025-02-26 04:17:08 +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 = {
|
var ParticleShader = function ()
|
||||||
vert: `
|
{
|
||||||
precision mediump float;
|
var vert = [
|
||||||
uniform mat4 u_view_matrix;
|
'precision mediump float;',
|
||||||
|
'uniform mat4 u_view_matrix;',
|
||||||
|
|
||||||
attribute vec2 a_position;
|
'attribute vec2 a_position;',
|
||||||
attribute vec2 a_tex_coord;
|
'attribute vec2 a_tex_coord;',
|
||||||
attribute vec4 a_color;
|
'attribute vec4 a_color;',
|
||||||
|
|
||||||
varying vec4 v_color;
|
'varying vec4 v_color;',
|
||||||
varying vec2 v_tex_coord;
|
'varying vec2 v_tex_coord;',
|
||||||
|
|
||||||
void main()
|
'void main()',
|
||||||
{
|
'{',
|
||||||
gl_Position = u_view_matrix * vec4(a_position, 1.0, 1.0);
|
' gl_Position = u_view_matrix * vec4(a_position, 1.0, 1.0);',
|
||||||
|
|
||||||
v_color = a_color;
|
' v_color = a_color;',
|
||||||
v_tex_coord = a_tex_coord;
|
' v_tex_coord = a_tex_coord;',
|
||||||
}
|
'}'
|
||||||
`,
|
];
|
||||||
frag: `
|
|
||||||
precision mediump float;
|
|
||||||
|
|
||||||
uniform sampler2D u_main_sampler;
|
var frag = [
|
||||||
|
'precision mediump float;',
|
||||||
|
|
||||||
varying vec4 v_color;
|
'uniform sampler2D u_main_sampler;',
|
||||||
varying vec2 v_tex_coord;
|
|
||||||
|
|
||||||
void main()
|
'varying vec4 v_color;',
|
||||||
{
|
'varying vec2 v_tex_coord;',
|
||||||
gl_FragColor = texture2D(u_main_sampler, v_tex_coord) * v_color;
|
|
||||||
}
|
|
||||||
|
|
||||||
`
|
'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…
Add table
Reference in a new issue