We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I tried to get it to work but it doesn't display at all. There are no compile errors.
Vertex
uniform mat4 u_progTrans; //SpriteBatch input attribute vec4 Position; attribute vec2 TexCoord; attribute vec4 Color; //Fragment output (varying) varying vec2 vTexCoord; varying vec4 vColor; //Main void main() { vColor = Color; vTexCoord = TexCoord; gl_Position = u_progTrans * Position; }
Fragment
#ifdef GL_ES #define LOWP lowp precision mediump float; #else #define LOWP #endif //Texture uniform sampler2D u_texture; //Input form vertex (varying) varying vec2 vTexCoord; varying LOWP vec4 vColor; //Main void main() { //Sample the texture vec4 texColor = texture2D(u_texture, vTexCoord); //Color modification texColor.rgb = 1.0 - texColor.rgb; //Output gl_FragColor = texColor * vColor; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I tried to get it to work but it doesn't display at all. There are no compile errors.
Vertex
Fragment
The text was updated successfully, but these errors were encountered: