Browse Source

Fixing letters background

Vinicius Teshima 1 năm trước cách đây
mục cha
commit
99aca3c197
2 tập tin đã thay đổi với 2 bổ sung5 xóa
  1. 1 2
      src/main.c
  2. 1 3
      src/simple_render.h

+ 1 - 2
src/main.c

@@ -86,10 +86,9 @@ main(int32_t argc, char **argv)
 		exit(EXIT_FAILURE);
 	}
 
-	struct free_glyph_atlas fga = fga_create(face);
 
 	struct simple_render sr = sr_create();
-	(void) sr;
+	struct free_glyph_atlas fga = fga_create(face);
 
 	app.fga = &fga;
 

+ 1 - 3
src/simple_render.h

@@ -342,12 +342,10 @@ sr_compile_shaders(struct simple_render *sr)
 		"	vec4 tc = texture(font, out_uv);\n"
 		"	vec2 frag_uv = gl_FragCoord.xy / resolution;\n"
 		"	vec4 rainbow = vec4(hsl2rgb(vec3((time + frag_uv.x + frag_uv.y), 0.5, 0.5)), 1.0);\n"
-		"	gl_FragColor =  (1.0 - tc.x) + tc.x * rainbow;\n"
+		"	gl_FragColor = tc.x * rainbow;\n"
 		"}\n"
 		, GL_FRAGMENT_SHADER);
 
-
-
 #undef GL_VER
 }