mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-30 16:10:04 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			539 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			539 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
| #version 330 core
 | |
| 
 | |
| // Lower the default precision to medium
 | |
| precision mediump float;
 | |
| 
 | |
| uniform sampler1D uTexture;
 | |
| uniform uint uDataMomentOffset;
 | |
| uniform float uDataMomentScale;
 | |
| 
 | |
| uniform bool uCFPEnabled;
 | |
| 
 | |
| in float dataMoment;
 | |
| in float cfpMoment;
 | |
| 
 | |
| layout (location = 0) out vec4 fragColor;
 | |
| 
 | |
| void main()
 | |
| {
 | |
|    float texCoord = (dataMoment - float(uDataMomentOffset)) / uDataMomentScale;
 | |
| 
 | |
|    if (uCFPEnabled && cfpMoment > 8u)
 | |
|    {
 | |
|       texCoord = texCoord - float(cfpMoment - 8u) / 2.0f;
 | |
|    }
 | |
| 
 | |
|    fragColor = texture(uTexture, texCoord);
 | |
| }
 | 
