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

public class Class243_Sub47_Sub2 extends Class243_Sub47
{
    static final String aString10509
	= "#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 aFloat10510;
    static float aFloat10511;
    static float aFloat10512 = 1.0F;
    static float aFloat10513;
    static float aFloat10514;
    Class145 aClass145_10515;
    
    boolean method16468() {
	if (((Class87_Sub1) ((Class243_Sub47_Sub2) this).aClass87_Sub1_10050)
	    .aBool8994) {
	    ((Class243_Sub47_Sub2) this).aClass145_10515
		= (Class145.method3524
		   (((Class243_Sub47_Sub2) this).aClass87_Sub1_10050,
		    (new Class155[]
		     { Class155.method3687
		       (((Class243_Sub47_Sub2) this).aClass87_Sub1_10050,
			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 ((Class243_Sub47_Sub2) this).aClass145_10515 != null;
	}
	return false;
    }
    
    boolean method16865() {
	return (((Class87_Sub1)
		 ((Class243_Sub47_Sub2) this).aClass87_Sub1_10050)
		.aBool8994);
    }
    
    boolean method16456() {
	return ((Class243_Sub47_Sub2) this).aClass145_10515 != null;
    }
    
    boolean method16457() {
	if (((Class87_Sub1) ((Class243_Sub47_Sub2) this).aClass87_Sub1_10050)
	    .aBool8994) {
	    ((Class243_Sub47_Sub2) this).aClass145_10515
		= (Class145.method3524
		   (((Class243_Sub47_Sub2) this).aClass87_Sub1_10050,
		    (new Class155[]
		     { Class155.method3687
		       (((Class243_Sub47_Sub2) this).aClass87_Sub1_10050,
			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 ((Class243_Sub47_Sub2) this).aClass145_10515 != null;
	}
	return false;
    }
    
    void method16459(int i, int i_0_) {
	/* empty */
    }
    
    boolean method16866() {
	return (((Class87_Sub1)
		 ((Class243_Sub47_Sub2) this).aClass87_Sub1_10050)
		.aBool8994);
    }
    
    void method16460(int i, Class141_Sub3 class141_sub3,
		     Class141_Sub3 class141_sub3_1_) {
	int i_2_ = (((Class145) ((Class243_Sub47_Sub2) this).aClass145_10515)
		    .anInt1718);
	OpenGL.glUseProgram(i_2_);
	OpenGL.glUniform1i(OpenGL.glGetUniformLocation(i_2_, "sceneTex"), 0);
	OpenGL.glUniform1f(OpenGL.glGetUniformLocation(i_2_, "paramsGamma"),
			   aFloat10512);
	OpenGL.glUniform4f(OpenGL.glGetUniformLocation(i_2_, "paramsRanges"),
			   aFloat10510, aFloat10511, aFloat10514, aFloat10513);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15018(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050
	    .method15019(class141_sub3);
    }
    
    void method16461(int i) {
	OpenGL.glUseProgram(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15018(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15019(null);
    }
    
    boolean method16475() {
	return (aFloat10512 == 1.0F && aFloat10510 == 0.0F
		&& aFloat10511 == 1.0F && aFloat10514 == 0.0F
		&& aFloat10513 == 1.0F);
    }
    
    void method16493(int i) {
	OpenGL.glUseProgram(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15018(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15019(null);
    }
    
    boolean method16466() {
	return (aFloat10512 == 1.0F && aFloat10510 == 0.0F
		&& aFloat10511 == 1.0F && aFloat10514 == 0.0F
		&& aFloat10513 == 1.0F);
    }
    
    Class243_Sub47_Sub2(Class87_Sub1 class87_sub1) {
	super(class87_sub1);
    }
    
    int method16463() {
	return 1;
    }
    
    boolean method16867() {
	return (((Class87_Sub1)
		 ((Class243_Sub47_Sub2) this).aClass87_Sub1_10050)
		.aBool8994);
    }
    
    boolean method16469() {
	if (((Class87_Sub1) ((Class243_Sub47_Sub2) this).aClass87_Sub1_10050)
	    .aBool8994) {
	    ((Class243_Sub47_Sub2) this).aClass145_10515
		= (Class145.method3524
		   (((Class243_Sub47_Sub2) this).aClass87_Sub1_10050,
		    (new Class155[]
		     { Class155.method3687
		       (((Class243_Sub47_Sub2) this).aClass87_Sub1_10050,
			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 ((Class243_Sub47_Sub2) this).aClass145_10515 != null;
	}
	return false;
    }
    
    void method16496() {
	((Class243_Sub47_Sub2) this).aClass145_10515 = null;
    }
    
    void method16471() {
	((Class243_Sub47_Sub2) this).aClass145_10515 = null;
    }
    
    void method16473(int i, int i_3_) {
	/* empty */
    }
    
    void method16488(int i, int i_4_) {
	/* empty */
    }
    
    boolean method16489() {
	return (aFloat10512 == 1.0F && aFloat10510 == 0.0F
		&& aFloat10511 == 1.0F && aFloat10514 == 0.0F
		&& aFloat10513 == 1.0F);
    }
    
    void method16455(int i, Class141_Sub3 class141_sub3,
		     Class141_Sub3 class141_sub3_5_) {
	int i_6_ = (((Class145) ((Class243_Sub47_Sub2) this).aClass145_10515)
		    .anInt1718);
	OpenGL.glUseProgram(i_6_);
	OpenGL.glUniform1i(OpenGL.glGetUniformLocation(i_6_, "sceneTex"), 0);
	OpenGL.glUniform1f(OpenGL.glGetUniformLocation(i_6_, "paramsGamma"),
			   aFloat10512);
	OpenGL.glUniform4f(OpenGL.glGetUniformLocation(i_6_, "paramsRanges"),
			   aFloat10510, aFloat10511, aFloat10514, aFloat10513);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15018(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050
	    .method15019(class141_sub3);
    }
    
    void method16474(int i, int i_7_) {
	/* empty */
    }
    
    void method16477(int i) {
	OpenGL.glUseProgram(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15018(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15019(null);
    }
    
    void method16490(int i) {
	OpenGL.glUseProgram(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15018(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15019(null);
    }
    
    void method16476(int i) {
	OpenGL.glUseProgram(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15018(0);
	((Class243_Sub47_Sub2) this).aClass87_Sub1_10050.method15019(null);
    }
    
    void method16458() {
	((Class243_Sub47_Sub2) this).aClass145_10515 = null;
    }
    
    Class90 method16498() {
	return Class90.aClass90_1040;
    }
    
    boolean method16467() {
	if (((Class87_Sub1) ((Class243_Sub47_Sub2) this).aClass87_Sub1_10050)
	    .aBool8994) {
	    ((Class243_Sub47_Sub2) this).aClass145_10515
		= (Class145.method3524
		   (((Class243_Sub47_Sub2) this).aClass87_Sub1_10050,
		    (new Class155[]
		     { Class155.method3687
		       (((Class243_Sub47_Sub2) this).aClass87_Sub1_10050,
			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 ((Class243_Sub47_Sub2) this).aClass145_10515 != null;
	}
	return false;
    }
    
    Class90 method16470() {
	return Class90.aClass90_1040;
    }
    
    Class90 method16495() {
	return Class90.aClass90_1040;
    }
    
    boolean method16486() {
	return (aFloat10512 == 1.0F && aFloat10510 == 0.0F
		&& aFloat10511 == 1.0F && aFloat10514 == 0.0F
		&& aFloat10513 == 1.0F);
    }
    
    boolean method16497() {
	return ((Class243_Sub47_Sub2) this).aClass145_10515 != null;
    }
    
    boolean method16485() {
	return (aFloat10512 == 1.0F && aFloat10510 == 0.0F
		&& aFloat10511 == 1.0F && aFloat10514 == 0.0F
		&& aFloat10513 == 1.0F);
    }
    
    boolean method16472() {
	return ((Class243_Sub47_Sub2) this).aClass145_10515 != null;
    }
    
    Class90 method16479() {
	return Class90.aClass90_1040;
    }
    
    boolean method16868() {
	return (((Class87_Sub1)
		 ((Class243_Sub47_Sub2) this).aClass87_Sub1_10050)
		.aBool8994);
    }
    
    boolean method16869() {
	return (((Class87_Sub1)
		 ((Class243_Sub47_Sub2) this).aClass87_Sub1_10050)
		.aBool8994);
    }
    
    int method16484() {
	return 1;
    }
    
    static {
	aFloat10510 = 0.0F;
	aFloat10511 = 1.0F;
	aFloat10514 = 0.0F;
	aFloat10513 = 1.0F;
    }
}
