setup shader files
This commit is contained in:
16
android/assets/shaders/default_frag.glsl
Executable file
16
android/assets/shaders/default_frag.glsl
Executable file
@@ -0,0 +1,16 @@
|
||||
#ifdef GL_ES
|
||||
#define LOWP lowp
|
||||
precision mediump float;
|
||||
#else
|
||||
#define LOWP
|
||||
#endif
|
||||
|
||||
varying LOWP vec4 v_color;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
uniform sampler2D u_texture;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = v_color * texture2D(u_texture, v_texCoords);
|
||||
}
|
16
android/assets/shaders/default_vertex.glsl
Executable file
16
android/assets/shaders/default_vertex.glsl
Executable file
@@ -0,0 +1,16 @@
|
||||
attribute vec4 a_position;
|
||||
attribute vec4 a_color;
|
||||
attribute vec2 a_texCoord;
|
||||
|
||||
uniform mat4 u_projTrans;
|
||||
|
||||
varying vec4 v_color;
|
||||
varying vec2 v_texCoords;
|
||||
|
||||
void main()
|
||||
{
|
||||
v_color = a_color;
|
||||
v_color.a = v_color.a * (256.0/255.0);
|
||||
v_texCoords = a_texCoord + 0;
|
||||
gl_Position = u_projTrans * a_position;
|
||||
}
|
@@ -1,4 +0,0 @@
|
||||
void main()
|
||||
{
|
||||
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
}
|
Reference in New Issue
Block a user