File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed
Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -94,11 +94,14 @@ void main() {
9494 // char size
9595 float charSize = 4.0;
9696 vec2 p = mod(pix / charSize, 2.0) - vec2(1.0);
97- col = vec3(character(n, p));
97+ float char = character(n, p);
98+
99+ vec3 charColor = vec3(1.0);
98100 if (gray < 0.2) {
99- col *= 0.4;
101+ charColor *= 0.4;
100102 }
101- fragColor = vec4(col, 1.0);
103+
104+ fragColor = vec4(charColor, char);
102105}` ;
103106
104107 const isMobile = ( ) => window . innerWidth < 768 ;
Original file line number Diff line number Diff line change @@ -92,16 +92,19 @@ void main() {
9292 // char size
9393 float charSize = 4.0;
9494 vec2 p = mod(pix / charSize, 2.0) - vec2(1.0);
95- col = vec3(character(n, p));
95+ float char = character(n, p);
96+
97+ vec3 charColor = vec3(1.0);
9698 if (gray < 0.2) {
97- col *= 0.4;
99+ charColor *= 0.4;
98100 }
99- fragColor = vec4(col, 1.0);
101+
102+ fragColor = vec4(charColor, char);
100103}` ;
101104
102105 const isMobile = ( ) => window . innerWidth < 768 ;
103106
104- const renderer = new Renderer ( { antialias : true } ) ;
107+ const renderer = new Renderer ( { antialias : true , alpha : true } ) ;
105108 const gl = renderer . gl ;
106109 gl . clearColor ( 0.0627 , 0.0627 , 0.0627 , 1.0 ) ;
107110 containerRef . current ?. appendChild ( gl . canvas ) ;
You can’t perform that action at this time.
0 commit comments