/* Class487_Sub4_Sub1 - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
import jaggl.OpenGL;

public class Class487_Sub4_Sub1 extends Class487_Sub4
{
    static final String aString11249
	= "#extension GL_ARB_texture_rectangle : enable\nuniform float paramsGamma;\nuniform vec4 paramsRanges;\nuniform sampler2DRect sceneTex;\nvoid main() {\n    vec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n    col -= vec3(paramsRanges.x,paramsRanges.x,paramsRanges.x);\n    vec3 colourClampedIn = col / (paramsRanges.y - paramsRanges.x);\n    vec3 colourGammaCorrected = pow(colourClampedIn, vec3(paramsGamma,paramsGamma,paramsGamma));\n    colourGammaCorrected = clamp(colourGammaCorrected,0.0,1.0);\n    vec3 outCol = mix(vec3(paramsRanges.z,paramsRanges.z,paramsRanges.z), vec3(paramsRanges.w,paramsRanges.w,paramsRanges.w), colourGammaCorrected);\n    gl_FragColor = vec4(clamp(outCol,0.0,1.0), 1.0);\n}\n";
    static float aFloat11250;
    static float aFloat11251;
    static float aFloat11252;
    static float aFloat11253 = 1.0F;
    static float aFloat11254;
    Class90 aClass90_11255;
    
    void method9094() {
	((Class487_Sub4_Sub1) this).aClass90_11255 = null;
    }
    
    static {
	aFloat11250 = 0.0F;
	aFloat11251 = 1.0F;
	aFloat11252 = 0.0F;
	aFloat11254 = 1.0F;
    }
    
    boolean method9064() {
	return ((Class487_Sub4_Sub1) this).aClass90_11255 != null;
    }
    
    boolean method9065() {
	if (((Class151_Sub3) ((Class487_Sub4_Sub1) this).aClass151_Sub3_10071)
	    .aBool9381) {
	    ((Class487_Sub4_Sub1) this).aClass90_11255
		= (Class90.method1246
		   (((Class487_Sub4_Sub1) this).aClass151_Sub3_10071,
		    (new Class102[]
		     { Class102.method1407
		       (((Class487_Sub4_Sub1) this).aClass151_Sub3_10071,
			35632,
			"#extension GL_ARB_texture_rectangle : enable\nuniform float paramsGamma;\nuniform vec4 paramsRanges;\nuniform sampler2DRect sceneTex;\nvoid main() {\n    vec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n    col -= vec3(paramsRanges.x,paramsRanges.x,paramsRanges.x);\n    vec3 colourClampedIn = col / (paramsRanges.y - paramsRanges.x);\n    vec3 colourGammaCorrected = pow(colourClampedIn, vec3(paramsGamma,paramsGamma,paramsGamma));\n    colourGammaCorrected = clamp(colourGammaCorrected,0.0,1.0);\n    vec3 outCol = mix(vec3(paramsRanges.z,paramsRanges.z,paramsRanges.z), vec3(paramsRanges.w,paramsRanges.w,paramsRanges.w), colourGammaCorrected);\n    gl_FragColor = vec4(clamp(outCol,0.0,1.0), 1.0);\n}\n") })));
	    return ((Class487_Sub4_Sub1) this).aClass90_11255 != null;
	}
	return false;
    }
    
    boolean method9089() {
	if (((Class151_Sub3) ((Class487_Sub4_Sub1) this).aClass151_Sub3_10071)
	    .aBool9381) {
	    ((Class487_Sub4_Sub1) this).aClass90_11255
		= (Class90.method1246
		   (((Class487_Sub4_Sub1) this).aClass151_Sub3_10071,
		    (new Class102[]
		     { Class102.method1407
		       (((Class487_Sub4_Sub1) this).aClass151_Sub3_10071,
			35632,
			"#extension GL_ARB_texture_rectangle : enable\nuniform float paramsGamma;\nuniform vec4 paramsRanges;\nuniform sampler2DRect sceneTex;\nvoid main() {\n    vec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n    col -= vec3(paramsRanges.x,paramsRanges.x,paramsRanges.x);\n    vec3 colourClampedIn = col / (paramsRanges.y - paramsRanges.x);\n    vec3 colourGammaCorrected = pow(colourClampedIn, vec3(paramsGamma,paramsGamma,paramsGamma));\n    colourGammaCorrected = clamp(colourGammaCorrected,0.0,1.0);\n    vec3 outCol = mix(vec3(paramsRanges.z,paramsRanges.z,paramsRanges.z), vec3(paramsRanges.w,paramsRanges.w,paramsRanges.w), colourGammaCorrected);\n    gl_FragColor = vec4(clamp(outCol,0.0,1.0), 1.0);\n}\n") })));
	    return ((Class487_Sub4_Sub1) this).aClass90_11255 != null;
	}
	return false;
    }
    
    void method9084() {
	((Class487_Sub4_Sub1) this).aClass90_11255 = null;
    }
    
    void method9068(int i, Class100_Sub3 class100_sub3,
		    Class100_Sub3 class100_sub3_0_, int i_1_, int i_2_) {
	int i_3_
	    = ((Class90) ((Class487_Sub4_Sub1) this).aClass90_11255).anInt1234;
	OpenGL.glUseProgram(i_3_);
	OpenGL.glUniform1i(OpenGL.glGetUniformLocation(i_3_, "sceneTex"), 0);
	OpenGL.glUniform1f(OpenGL.glGetUniformLocation(i_3_, "paramsGamma"),
			   aFloat11253);
	OpenGL.glUniform4f(OpenGL.glGetUniformLocation(i_3_, "paramsRanges"),
			   aFloat11250, aFloat11251, aFloat11252, aFloat11254);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071.method8590(0);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071
	    .method8591(class100_sub3);
    }
    
    void method9097(int i) {
	OpenGL.glUseProgram(0);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071.method8590(0);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071.method8591(null);
    }
    
    Class155 method9090() {
	return Class155.aClass155_1894;
    }
    
    int method9070() {
	return 1;
    }
    
    boolean method9074() {
	return (aFloat11253 == 1.0F && aFloat11250 == 0.0F
		&& aFloat11251 == 1.0F && aFloat11252 == 0.0F
		&& aFloat11254 == 1.0F);
    }
    
    void method9067(int i, int i_4_) {
	/* empty */
    }
    
    void method9085(int i, Class100_Sub3 class100_sub3,
		    Class100_Sub3 class100_sub3_5_, int i_6_, int i_7_) {
	int i_8_
	    = ((Class90) ((Class487_Sub4_Sub1) this).aClass90_11255).anInt1234;
	OpenGL.glUseProgram(i_8_);
	OpenGL.glUniform1i(OpenGL.glGetUniformLocation(i_8_, "sceneTex"), 0);
	OpenGL.glUniform1f(OpenGL.glGetUniformLocation(i_8_, "paramsGamma"),
			   aFloat11253);
	OpenGL.glUniform4f(OpenGL.glGetUniformLocation(i_8_, "paramsRanges"),
			   aFloat11250, aFloat11251, aFloat11252, aFloat11254);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071.method8590(0);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071
	    .method8591(class100_sub3);
    }
    
    boolean method9076() {
	if (((Class151_Sub3) ((Class487_Sub4_Sub1) this).aClass151_Sub3_10071)
	    .aBool9381) {
	    ((Class487_Sub4_Sub1) this).aClass90_11255
		= (Class90.method1246
		   (((Class487_Sub4_Sub1) this).aClass151_Sub3_10071,
		    (new Class102[]
		     { Class102.method1407
		       (((Class487_Sub4_Sub1) this).aClass151_Sub3_10071,
			35632,
			"#extension GL_ARB_texture_rectangle : enable\nuniform float paramsGamma;\nuniform vec4 paramsRanges;\nuniform sampler2DRect sceneTex;\nvoid main() {\n    vec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n    col -= vec3(paramsRanges.x,paramsRanges.x,paramsRanges.x);\n    vec3 colourClampedIn = col / (paramsRanges.y - paramsRanges.x);\n    vec3 colourGammaCorrected = pow(colourClampedIn, vec3(paramsGamma,paramsGamma,paramsGamma));\n    colourGammaCorrected = clamp(colourGammaCorrected,0.0,1.0);\n    vec3 outCol = mix(vec3(paramsRanges.z,paramsRanges.z,paramsRanges.z), vec3(paramsRanges.w,paramsRanges.w,paramsRanges.w), colourGammaCorrected);\n    gl_FragColor = vec4(clamp(outCol,0.0,1.0), 1.0);\n}\n") })));
	    return ((Class487_Sub4_Sub1) this).aClass90_11255 != null;
	}
	return false;
    }
    
    boolean method9077() {
	if (((Class151_Sub3) ((Class487_Sub4_Sub1) this).aClass151_Sub3_10071)
	    .aBool9381) {
	    ((Class487_Sub4_Sub1) this).aClass90_11255
		= (Class90.method1246
		   (((Class487_Sub4_Sub1) this).aClass151_Sub3_10071,
		    (new Class102[]
		     { Class102.method1407
		       (((Class487_Sub4_Sub1) this).aClass151_Sub3_10071,
			35632,
			"#extension GL_ARB_texture_rectangle : enable\nuniform float paramsGamma;\nuniform vec4 paramsRanges;\nuniform sampler2DRect sceneTex;\nvoid main() {\n    vec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n    col -= vec3(paramsRanges.x,paramsRanges.x,paramsRanges.x);\n    vec3 colourClampedIn = col / (paramsRanges.y - paramsRanges.x);\n    vec3 colourGammaCorrected = pow(colourClampedIn, vec3(paramsGamma,paramsGamma,paramsGamma));\n    colourGammaCorrected = clamp(colourGammaCorrected,0.0,1.0);\n    vec3 outCol = mix(vec3(paramsRanges.z,paramsRanges.z,paramsRanges.z), vec3(paramsRanges.w,paramsRanges.w,paramsRanges.w), colourGammaCorrected);\n    gl_FragColor = vec4(clamp(outCol,0.0,1.0), 1.0);\n}\n") })));
	    return ((Class487_Sub4_Sub1) this).aClass90_11255 != null;
	}
	return false;
    }
    
    void method9086(int i, Class100_Sub3 class100_sub3,
		    Class100_Sub3 class100_sub3_9_, int i_10_, int i_11_) {
	int i_12_
	    = ((Class90) ((Class487_Sub4_Sub1) this).aClass90_11255).anInt1234;
	OpenGL.glUseProgram(i_12_);
	OpenGL.glUniform1i(OpenGL.glGetUniformLocation(i_12_, "sceneTex"), 0);
	OpenGL.glUniform1f(OpenGL.glGetUniformLocation(i_12_, "paramsGamma"),
			   aFloat11253);
	OpenGL.glUniform4f(OpenGL.glGetUniformLocation(i_12_, "paramsRanges"),
			   aFloat11250, aFloat11251, aFloat11252, aFloat11254);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071.method8590(0);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071
	    .method8591(class100_sub3);
    }
    
    Class155 method9079() {
	return Class155.aClass155_1894;
    }
    
    boolean method10240() {
	return (((Class151_Sub3)
		 ((Class487_Sub4_Sub1) this).aClass151_Sub3_10071)
		.aBool9381);
    }
    
    void method9081(int i, int i_13_) {
	/* empty */
    }
    
    void method9093(int i, int i_14_) {
	/* empty */
    }
    
    void method9091(int i, int i_15_) {
	/* empty */
    }
    
    void method9082(int i, int i_16_) {
	/* empty */
    }
    
    void method9087(int i) {
	OpenGL.glUseProgram(0);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071.method8590(0);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071.method8591(null);
    }
    
    int method9071() {
	return 1;
    }
    
    void method9080() {
	((Class487_Sub4_Sub1) this).aClass90_11255 = null;
    }
    
    void method9088(int i) {
	OpenGL.glUseProgram(0);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071.method8590(0);
	((Class487_Sub4_Sub1) this).aClass151_Sub3_10071.method8591(null);
    }
    
    Class487_Sub4_Sub1(Class151_Sub3 class151_sub3) {
	super(class151_sub3);
    }
    
    int method9075() {
	return 1;
    }
    
    Class155 method9078() {
	return Class155.aClass155_1894;
    }
    
    boolean method9063() {
	return ((Class487_Sub4_Sub1) this).aClass90_11255 != null;
    }
    
    boolean method9083() {
	return (aFloat11253 == 1.0F && aFloat11250 == 0.0F
		&& aFloat11251 == 1.0F && aFloat11252 == 0.0F
		&& aFloat11254 == 1.0F);
    }
    
    boolean method9098() {
	return (aFloat11253 == 1.0F && aFloat11250 == 0.0F
		&& aFloat11251 == 1.0F && aFloat11252 == 0.0F
		&& aFloat11254 == 1.0F);
    }
}
