Thank you, Egon.
Is there any chance to improve blitting performance? Another thing is that uniforms applied to a blitting shader seem to be ignored because blits are drawn batched so just the last set values will be used for one batch.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuuniform mat4 modelViewMatrix;
uniform mat4 modelViewProjectionMatrix;
uniform mat4 textureMatrix;
uniform vec4 additionalColor;
uniform vec4 ambientColor;
uniform float alpha;
uniform bool useColors;
attribute vec4 position;
attribute vec4 color;
attribute vec2 texture0;
varying vec2 texCoord;
varying vec4 vertexColor;
void main() {
texCoord = (textureMatrix * vec4(texture0, 0, 1)).xy;
vec4 vertexPos = modelViewMatrix * position;
vertexColor = ambientColor + additionalColor;
vertexColor=vec4(min(vec3(1), vertexColor.xyz * color.xyz), alpha);
gl_Position = modelViewProjectionMatrix * position;
}
precision mediump float;
uniform sampler2D textureUnit0;
varying vec2 texCoord;
varying vec4 vertexColor;
void main() {
vec4 col = texture2D(textureUnit0, texCoord) * vertexColor;
float grey = 0.3 * col.r + 0.6 * col.g + 0.1 * col.b;
col = vec4(vec3(grey), col.a);
gl_FragColor=col;
}
Quote from: gamenewer on January 05, 2015, 10:58:08 AMB behind the A and C behind the B, but it seems b and c can see through A . It maybe the Z-Order problem.
Page created in 0.021 seconds with 14 queries.