mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-11-04 14:10:06 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			545 B
		
	
	
	
		
			GLSL
		
	
	
	
	
	
			
		
		
	
	
			27 lines
		
	
	
	
		
			545 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;
 | 
						|
 | 
						|
flat in uint dataMoment;
 | 
						|
flat in uint cfpMoment;
 | 
						|
 | 
						|
layout (location = 0) out vec4 fragColor;
 | 
						|
 | 
						|
void main()
 | 
						|
{
 | 
						|
   float texCoord = float(dataMoment - uDataMomentOffset) / uDataMomentScale;
 | 
						|
 | 
						|
   if (uCFPEnabled && cfpMoment > 8u)
 | 
						|
   {
 | 
						|
      texCoord = texCoord - float(cfpMoment - 8u) / 2.0f;
 | 
						|
   }
 | 
						|
 | 
						|
   fragColor = texture(uTexture, texCoord);
 | 
						|
}
 |