mirror of
				https://github.com/OpenMW/openmw.git
				synced 2025-10-28 00:56:37 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			21 lines
		
	
	
	
		
			355 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			355 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #version 120
 | |
| 
 | |
| varying vec2 uv;
 | |
| uniform samplerCube cubeMap;
 | |
| uniform int mapping;
 | |
| 
 | |
| #include "lib/util/coordinates.glsl"
 | |
| 
 | |
| void main(void)
 | |
| {
 | |
|     vec3 c;
 | |
| 
 | |
|     if (mapping == 0)
 | |
|         c = sphericalCoords(uv);
 | |
|     else if (mapping == 1)
 | |
|         c = cylindricalCoords(uv);
 | |
|     else
 | |
|         c = planetCoords(uv);
 | |
| 
 | |
|     gl_FragData[0] = textureCube(cubeMap,c);
 | |
| }
 |