Format shaders (#639)

This commit is contained in:
Gustl22
2019-01-25 21:38:26 +01:00
committed by Emux
parent 84d6b311ea
commit d219632825
22 changed files with 74 additions and 68 deletions

View File

@@ -11,8 +11,8 @@ uniform vec2 u_screen;
attribute vec2 a_pos;
varying vec4 v_pos;
varying vec2 s_pos;
void
main(){
void main() {
v_pos = u_mvp * vec4(a_pos, 0.0, 1.0);
s_pos = v_pos.xy / v_pos.w;
gl_Position = v_pos;
@@ -28,8 +28,8 @@ uniform float u_width;
uniform vec2 u_screen;
varying vec4 v_pos;
varying vec2 s_pos;
void
main(){
void main() {
vec2 pos = (v_pos.xy) / v_pos.w * u_screen;
float l = length(gl_FragCoord.xy - u_screen - pos.xy);