mirror of
				https://github.com/luanti-org/luanti.git
				synced 2025-10-29 14:45:20 +01:00 
			
		
		
		
	This replaces annoying calculations on C++-side and eases the implementation of 2D geometry batch rendering a lot.
		
			
				
	
	
		
			26 lines
		
	
	
		
			422 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			422 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #version 100
 | |
| 
 | |
| /* Attributes */
 | |
| 
 | |
| attribute vec4 inVertexPosition;
 | |
| attribute vec4 inVertexColor;
 | |
| attribute vec2 inTexCoord0;
 | |
| 
 | |
| /* Uniforms */
 | |
| 
 | |
| uniform float uThickness;
 | |
| uniform mat4 uProjection;
 | |
| 
 | |
| /* Varyings */
 | |
| 
 | |
| varying vec2 vTextureCoord;
 | |
| varying vec4 vVertexColor;
 | |
| 
 | |
| void main()
 | |
| {
 | |
| 	gl_Position = uProjection * inVertexPosition;
 | |
| 	gl_PointSize = uThickness;
 | |
| 	vTextureCoord = inTexCoord0;
 | |
| 	vVertexColor = inVertexColor.bgra;
 | |
| }
 |