Skip to content

Instantly share code, notes, and snippets.

View hjhimanshu01's full-sized avatar

Himanshu Jotwani hjhimanshu01

View GitHub Profile
@hjhimanshu01
hjhimanshu01 / fragmentShader.glsl
Created July 7, 2019 10:18
fragment shader for line
precision mediump float;
uniform vec4 color;
void main() {
gl_FragColor = vec4(color.r, color.g, color.b, color.a);
}
precision mediump float;
attribute vec2 position;
attribute vec2 normal;
uniform vec2 width;
void main(void) {
gl_Position = vec4(width * normal, 0, 0) + vec4(position,0,1);
}