Шейдер отладочных лампочек
This commit is contained in:
		
							parent
							
								
									56beabe32f
								
							
						
					
					
						commit
						eff4b6d39d
					
				
							
								
								
									
										16
									
								
								shaders/bulb.frag
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								shaders/bulb.frag
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,16 @@
 | 
				
			|||||||
 | 
					#version 420 core 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					layout(std140, binding = 1) uniform Material
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    vec3 ka;
 | 
				
			||||||
 | 
					    vec3 kd;
 | 
				
			||||||
 | 
					    vec3 ks;
 | 
				
			||||||
 | 
					    float p;
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					out vec4 color;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void main()
 | 
				
			||||||
 | 
					{   
 | 
				
			||||||
 | 
					    color = vec4(ka, 1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										17
									
								
								shaders/bulb.vert
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								shaders/bulb.vert
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,17 @@
 | 
				
			|||||||
 | 
					#version 420 core 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					layout(location = 0) in vec3 pos; 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					layout(std140, binding = 0) uniform Camera
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					    mat4 projection;
 | 
				
			||||||
 | 
					    mat4 view;
 | 
				
			||||||
 | 
					    vec3 position;
 | 
				
			||||||
 | 
					} camera;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					uniform mat4 model;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void main() 
 | 
				
			||||||
 | 
					{ 
 | 
				
			||||||
 | 
					    gl_Position = camera.projection * camera.view * model * vec4(pos, 1.0);
 | 
				
			||||||
 | 
					} 
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user