Removing old shaders.
@@ -161,66 +161,6 @@ ChipmunkDebugDrawInit(void)
}
}
});
-
- /*
- // Setup the AA shader.
- GLint vshader = CompileShader(GL_VERTEX_SHADER, GLSL(
- attribute vec2 vertex;
- attribute vec2 aa_coord;
- attribute vec4 fill_color;
- attribute vec4 outline_color;
-
- varying vec2 v_aa_coord;
- varying vec4 v_fill_color;
- varying vec4 v_outline_color;
-
- void main(void){
- // TODO: get rid of the GL 2.x matrix bit eventually?
- gl_Position = gl_ModelViewProjectionMatrix*vec4(vertex, 0.0, 1.0);
-
- v_fill_color = fill_color;
- v_outline_color = outline_color;
- v_aa_coord = aa_coord;
- }
- ));
-
- GLint fshader = CompileShader(GL_FRAGMENT_SHADER, GLSL(
- uniform float u_outline_coef;
-
- varying vec2 v_aa_coord;
- varying vec4 v_fill_color;
- //const vec4 v_fill_color = vec4(0.0, 0.0, 0.0, 1.0);
- varying vec4 v_outline_color;
-
- float aa_step(float t1, float t2, float f)
- {
- //return step(t2, f);
- return smoothstep(t1, t2, f);
- }
-
- void main(void)
- {
- float l = length(v_aa_coord);
-
- // Different pixel size estimations are handy.
- //float fw = fwidth(l);
- //float fw = length(vec2(dFdx(l), dFdy(l)));
- float fw = length(fwidth(v_aa_coord));
-
- // Outline width threshold.
- float ow = 1.0 - fw;// *u_outline_coef;
-
- // Fill/outline color.
- float fo_step = aa_step(max(ow - fw, 0.0), ow, l);
- vec4 fo_color = mix(v_fill_color, v_outline_color, fo_step);
-
- // Use pre-multiplied alpha.
- float alpha = 1.0 - aa_step(1.0 - fw, 1.0, l);
- gl_FragColor = fo_color*(fo_color.a*alpha);
- //gl_FragColor = vec4(vec3(l), 1);
- }
- ));
- */
}
static Vertex *push_vertexes(size_t vcount, const Index *index_src, size_t icount){
