Adds a skydome with two scrolling layers of procedurally generated clouds to create an interestingish environment.
		
			
				
	
	
		
			22 lines
		
	
	
		
			504 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			504 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
#version 330 core
 | 
						|
layout (location = 0) in vec3 aPos;
 | 
						|
 | 
						|
out vec3 TexCoords;
 | 
						|
 | 
						|
uniform float u_Time;
 | 
						|
uniform float u_ScrollSpeed;
 | 
						|
uniform mat4 model;
 | 
						|
uniform mat4 view;
 | 
						|
uniform mat4 projection;
 | 
						|
 | 
						|
void main() {
 | 
						|
  TexCoords = aPos;
 | 
						|
 | 
						|
  /* Rotate texture coords around Y axis for scrolling. */
 | 
						|
  float angle = u_Time * u_ScrollSpeed;
 | 
						|
  mat3 rot = mat3(cos(angle), 0, sin(angle), 0, 1, 0, -sin(angle), 0, cos(angle));
 | 
						|
  TexCoords = rot * TexCoords;
 | 
						|
 | 
						|
  gl_Position = projection * view * model * vec4(aPos, 1.0);
 | 
						|
}
 |