mirror of
				https://gitlab.freedesktop.org/wlroots/wlroots.git
				synced 2025-11-03 09:01:40 -05:00 
			
		
		
		
	Fix alpha for src_rgba and src_rgbx
This commit is contained in:
		
							parent
							
								
									1e5b5d15a6
								
							
						
					
					
						commit
						35e83800d4
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -63,7 +63,8 @@ const GLchar tex_fragment_src_rgba[] =
 | 
				
			||||||
"uniform float alpha;\n"
 | 
					"uniform float alpha;\n"
 | 
				
			||||||
"\n"
 | 
					"\n"
 | 
				
			||||||
"void main() {\n"
 | 
					"void main() {\n"
 | 
				
			||||||
"	gl_FragColor = alpha * texture2D(tex, v_texcoord);\n"
 | 
					"	gl_FragColor.rgb = texture2D(tex, v_texcoord).rgb;\n"
 | 
				
			||||||
 | 
					"	gl_FragColor.a = alpha * texture2D(tex, v_texcoord).a;\n"
 | 
				
			||||||
"}\n";
 | 
					"}\n";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const GLchar tex_fragment_src_rgbx[] =
 | 
					const GLchar tex_fragment_src_rgbx[] =
 | 
				
			||||||
| 
						 | 
					@ -73,7 +74,7 @@ const GLchar tex_fragment_src_rgbx[] =
 | 
				
			||||||
"uniform float alpha;\n"
 | 
					"uniform float alpha;\n"
 | 
				
			||||||
"\n"
 | 
					"\n"
 | 
				
			||||||
"void main() {\n"
 | 
					"void main() {\n"
 | 
				
			||||||
"	gl_FragColor.rgb = alpha * texture2D(tex, v_texcoord).rgb;\n"
 | 
					"	gl_FragColor.rgb = texture2D(tex, v_texcoord).rgb;\n"
 | 
				
			||||||
"	gl_FragColor.a = alpha;\n"
 | 
					"	gl_FragColor.a = alpha;\n"
 | 
				
			||||||
"}\n";
 | 
					"}\n";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue