mirror of
				https://github.com/raysan5/raylib.git
				synced 2025-10-26 12:27:01 +00:00 
			
		
		
		
	Reviewed shaders and added comments
This commit is contained in:
		
							
								
								
									
										26
									
								
								examples/resources/shaders/glsl100/base.vs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								examples/resources/shaders/glsl100/base.vs
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
			
		||||
#version 100
 | 
			
		||||
 | 
			
		||||
// Input vertex attributes
 | 
			
		||||
attribute vec3 vertexPosition;
 | 
			
		||||
attribute vec2 vertexTexCoord;
 | 
			
		||||
attribute vec3 vertexNormal;
 | 
			
		||||
attribute vec4 vertexColor;
 | 
			
		||||
 | 
			
		||||
// Input uniform values
 | 
			
		||||
uniform mat4 mvpMatrix;
 | 
			
		||||
 | 
			
		||||
// Output vertex attributes (to fragment shader)
 | 
			
		||||
varying vec2 fragTexCoord;
 | 
			
		||||
varying vec4 fragColor;
 | 
			
		||||
 | 
			
		||||
// NOTE: Add here your custom variables 
 | 
			
		||||
 | 
			
		||||
void main()
 | 
			
		||||
{
 | 
			
		||||
    // Send vertex attributes to fragment shader
 | 
			
		||||
    fragTexCoord = vertexTexCoord;
 | 
			
		||||
    fragColor = vertexColor;
 | 
			
		||||
    
 | 
			
		||||
    // Calculate final vertex position
 | 
			
		||||
    gl_Position = mvpMatrix*vec4(vertexPosition, 1.0);
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user