<commit_before>package com.sonicjumper.enhancedvisuals.visuals.types;

import java.util.ArrayList;
import java.util.HashMap;

import com.sonicjumper.enhancedvisuals.addon.toughasnails.ToughAsNailsAddon;
import com.sonicjumper.enhancedvisuals.visuals.Visual;
import com.sonicjumper.enhancedvisuals.visuals.VisualPersistent;

import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.shader.Framebuffer;
import net.minecraft.client.shader.Shader;
import net.minecraft.client.shader.ShaderUniform;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.common.Loader;

public abstract class VisualType {
	
	public static VisualType splatter = new VisualTypeSplat("splatter", true);
	public static VisualType impact = new VisualTypeSplat("impact", true);
	public static VisualType slash = new VisualTypeSplat("slash", true);
	public static VisualType pierce = new VisualTypeSplat("pierce", true);
	public static VisualType dust = new VisualTypeSplat("dust", true);
	public static VisualType fire = new VisualTypeSplat("fire", true);
	public static VisualType sand = new VisualTypeSplat("sand", true);
	public static VisualType waterS = new VisualTypeSplat("water", false);
	
	public static VisualType lowhealth = new VisualTypeOverlay("lowhealth", false);
	public static VisualType damaged = new VisualTypeOverlay("damaged", false);
	public static VisualType potion = new VisualTypeOverlay("potion", false);
	
	public static VisualType slender = new VisualTypeOverlay("slender", 50, false){
		
		@Override
		public VisualPersistent createPersitentVisual()
		{
			return new VisualPersistent(this, 0);
		}
		
	};
	
	public static VisualType blur = new VisualTypeShader("blur", new ResourceLocation("shaders/post/blur.json"), false){
		
		@Override
		public VisualPersistent createPersitentVisual()
		{
			return new VisualPersistent(this, 0);
		}
		
		@Override
		public void changeProperties(float intensity) {
			for(Shader mcShader : shaderGroup.getShaders()) {
				ShaderUniform shaderuniform = mcShader.getShaderManager().getShaderUniform("Radius");
				
				if (shaderuniform != null) {
		        	shaderuniform.set((float) Math.floor(intensity));
		        }
			}
		}
		
		@Override
		public boolean needsToBeRendered(float intensity) {
			return intensity > 0;
		}
		
	};
	public static VisualType desaturate = new VisualTypeShader("desaturate", new ResourceLocation("shaders/post/desaturate.json"), false){
		
		@Override
		public VisualPersistent createPersitentVisual()
		{
			return new VisualPersistent(this, 1);
		}
		<commit_msg>Fixed blur shader rendering issue<commit_after>package com.sonicjumper.enhancedvisuals.visuals.types;

import java.util.ArrayList;
import java.util.HashMap;

import com.sonicjumper.enhancedvisuals.addon.toughasnails.ToughAsNailsAddon;
import com.sonicjumper.enhancedvisuals.visuals.Visual;
import com.sonicjumper.enhancedvisuals.visuals.VisualPersistent;

import net.minecraft.client.gui.ScaledResolution;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.shader.Framebuffer;
import net.minecraft.client.shader.Shader;
import net.minecraft.client.shader.ShaderUniform;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.common.config.Configuration;
import net.minecraftforge.fml.common.Loader;

public abstract class VisualType {
	
	public static VisualType splatter = new VisualTypeSplat("splatter", true);
	public static VisualType impact = new VisualTypeSplat("impact", true);
	public static VisualType slash = new VisualTypeSplat("slash", true);
	public static VisualType pierce = new VisualTypeSplat("pierce", true);
	public static VisualType dust = new VisualTypeSplat("dust", true);
	public static VisualType fire = new VisualTypeSplat("fire", true);
	public static VisualType sand = new VisualTypeSplat("sand", true);
	public static VisualType waterS = new VisualTypeSplat("water", false);
	
	public static VisualType lowhealth = new VisualTypeOverlay("lowhealth", false);
	public static VisualType damaged = new VisualTypeOverlay("damaged", false);
	public static VisualType potion = new VisualTypeOverlay("potion", false);
	
	public static VisualType slender = new VisualTypeOverlay("slender", 50, false){
		
		@Override
		public VisualPersistent createPersitentVisual()
		{
			return new VisualPersistent(this, 0);
		}
		
	};
	
	public static VisualType blur = new VisualTypeShader("blur", new ResourceLocation("shaders/post/blur.json"), false){
		
		@Override
		public VisualPersistent createPersitentVisual()
		{
			return new VisualPersistent(this, 0);
		}
		
		@Override
		public void changeProperties(float intensity) {
			for(Shader mcShader : shaderGroup.getShaders()) {
				ShaderUniform shaderuniform = mcShader.getShaderManager().getShaderUniform("Radius");
				
				if (shaderuniform != null) {
		        	shaderuniform.set((float) Math.floor(intensity));
		        }
			}
		}
		
		@Override
		public boolean needsToBeRendered(float intensity) {
			return Math.floor(intensity) > 0;
		}
		
	};
	public static VisualType desaturate = new VisualTypeShader("desaturate", new ResourceLocation("shaders/post/desaturate.json"), false){
		
		@Override
		public VisualPersistent createPersitentVisual()
		{
			return new VisualPersistent(this, 1);
		}
		
{'fraction_non_alphanumeric': 0.09707158351409978, 'fraction_numerical': 0.0021691973969631237, 'mean_word_length': 5.433720930232558, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4335343', 'n_tokens_mistral': 1738, 'n_tokens_neox': 1570, 'n_words': 374}