Here is the daily question:
How do i prevent "my" sprite from this to happen when i apply a shader
http://i.imgur.com/0bTl0TP.png
My shader vertex is the default and the fragment is this:
//
// Simple passthrough fragment shader
//
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
void main()
{
// Get the original color of the pixel
vec4 OC = texture2D( gm_BaseTexture, v_vTexcoord );
float Average = (OC.r + OC.g + OC.b) / 3.0;
float Alpha = 1.0;
// Create the color
vec4 Color = vec4(Average, Average, Average, Alpha);
// Output the new color
gl_FragColor = Color;
}
How do i prevent "my" sprite from this to happen when i apply a shader
http://i.imgur.com/0bTl0TP.png
My shader vertex is the default and the fragment is this:
//
// Simple passthrough fragment shader
//
varying vec2 v_vTexcoord;
varying vec4 v_vColour;
void main()
{
// Get the original color of the pixel
vec4 OC = texture2D( gm_BaseTexture, v_vTexcoord );
float Average = (OC.r + OC.g + OC.b) / 3.0;
float Alpha = 1.0;
// Create the color
vec4 Color = vec4(Average, Average, Average, Alpha);
// Output the new color
gl_FragColor = Color;
}