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

public class Class243_Sub47_Sub1 extends Class243_Sub47
{
    static final String aString10495
	= "#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n";
    static final String aString10496
	= "void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\toutCol += mix( texture2D(remap_3, coordA), texture2D(remap_3, coordB), UVFrac.z ).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n";
    static int anInt10497;
    static Class167_Sub2[] aClass167_Sub2Array10498;
    Class145[] aClass145Array10499 = null;
    static final String aString10500
	= "void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n";
    static float aFloat10501;
    static float[] aFloatArray10502 = { 0.0F, 0.0F, 0.0F };
    static final String aString10503
	= "#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n";
    static final String aString10504
	= "void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n";
    static final String aString10505
	= "void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n";
    static final String aString10506
	= "void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\toutCol += texture3D(remap_3, col).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n";
    static final String aString10507
	= "void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n";
    
    void method16474(int i, int i_0_) {
	/* empty */
    }
    
    void method16493(int i) {
	OpenGL.glUseProgram(0);
	for (int i_1_ = anInt10497; i_1_ >= 0; i_1_--) {
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050.method15018(i_1_);
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050.method15019(null);
	}
    }
    
    boolean method16456() {
	return ((Class243_Sub47_Sub1) this).aClass145Array10499 != null;
    }
    
    int method16463() {
	return 2;
    }
    
    void method16459(int i, int i_2_) {
	/* empty */
    }
    
    void method16460(int i, Class141_Sub3 class141_sub3,
		     Class141_Sub3 class141_sub3_3_) {
	if (anInt10497 >= 1 && anInt10497 <= 3) {
	    int i_4_ = (((Class145) (((Class243_Sub47_Sub1) this)
				     .aClass145Array10499[anInt10497 - 1]))
			.anInt1718);
	    OpenGL.glUseProgram(i_4_);
	    OpenGL.glUniform1i(OpenGL.glGetUniformLocation(i_4_, "sceneTex"),
			       0);
	    OpenGL.glUniform4f(OpenGL.glGetUniformLocation(i_4_,
							   "paramsWeightings"),
			       aFloat10501, aFloatArray10502[0],
			       aFloatArray10502[1], aFloatArray10502[2]);
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050.method15018(0);
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050
		.method15019(class141_sub3);
	    for (int i_5_ = anInt10497 - 1; i_5_ >= 0; i_5_--) {
		if (aClass167_Sub2Array10498[i_5_] != null) {
		    if (i_5_ == 0)
			OpenGL.glUniform1i
			    (OpenGL.glGetUniformLocation(i_4_, "remap_1"), 1);
		    if (i_5_ == 1)
			OpenGL.glUniform1i
			    (OpenGL.glGetUniformLocation(i_4_, "remap_2"), 2);
		    if (i_5_ == 2)
			OpenGL.glUniform1i
			    (OpenGL.glGetUniformLocation(i_4_, "remap_3"), 3);
		    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050
			.method15018(i_5_ + 1);
		    Class141 class141
			= aClass167_Sub2Array10498[i_5_].method15951();
		    if (class141 != null)
			((Class243_Sub47_Sub1) this).aClass87_Sub1_10050
			    .method15019(class141);
		}
	    }
	}
    }
    
    void method16455(int i, Class141_Sub3 class141_sub3,
		     Class141_Sub3 class141_sub3_6_) {
	if (anInt10497 >= 1 && anInt10497 <= 3) {
	    int i_7_ = (((Class145) (((Class243_Sub47_Sub1) this)
				     .aClass145Array10499[anInt10497 - 1]))
			.anInt1718);
	    OpenGL.glUseProgram(i_7_);
	    OpenGL.glUniform1i(OpenGL.glGetUniformLocation(i_7_, "sceneTex"),
			       0);
	    OpenGL.glUniform4f(OpenGL.glGetUniformLocation(i_7_,
							   "paramsWeightings"),
			       aFloat10501, aFloatArray10502[0],
			       aFloatArray10502[1], aFloatArray10502[2]);
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050.method15018(0);
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050
		.method15019(class141_sub3);
	    for (int i_8_ = anInt10497 - 1; i_8_ >= 0; i_8_--) {
		if (aClass167_Sub2Array10498[i_8_] != null) {
		    if (i_8_ == 0)
			OpenGL.glUniform1i
			    (OpenGL.glGetUniformLocation(i_7_, "remap_1"), 1);
		    if (i_8_ == 1)
			OpenGL.glUniform1i
			    (OpenGL.glGetUniformLocation(i_7_, "remap_2"), 2);
		    if (i_8_ == 2)
			OpenGL.glUniform1i
			    (OpenGL.glGetUniformLocation(i_7_, "remap_3"), 3);
		    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050
			.method15018(i_8_ + 1);
		    Class141 class141
			= aClass167_Sub2Array10498[i_8_].method15951();
		    if (class141 != null)
			((Class243_Sub47_Sub1) this).aClass87_Sub1_10050
			    .method15019(class141);
		}
	    }
	}
    }
    
    void method16461(int i) {
	OpenGL.glUseProgram(0);
	for (int i_9_ = anInt10497; i_9_ >= 0; i_9_--) {
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050.method15018(i_9_);
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050.method15019(null);
	}
    }
    
    Class90 method16479() {
	return Class90.aClass90_1040;
    }
    
    Class243_Sub47_Sub1(Class87_Sub1 class87_sub1) {
	super(class87_sub1);
    }
    
    boolean method16466() {
	return (aFloat10501 == 1.0F
		|| (aFloatArray10502[0] + aFloatArray10502[1]
		    + aFloatArray10502[2]) == 0.0F
		|| (aClass167_Sub2Array10498[0] == null
		    && aClass167_Sub2Array10498[1] == null
		    && aClass167_Sub2Array10498[2] == null));
    }
    
    static {
	aFloat10501 = 1.0F;
	anInt10497 = 1;
	aClass167_Sub2Array10498 = new Class167_Sub2[] { null, null, null };
    }
    
    boolean method16485() {
	return (aFloat10501 == 1.0F
		|| (aFloatArray10502[0] + aFloatArray10502[1]
		    + aFloatArray10502[2]) == 0.0F
		|| (aClass167_Sub2Array10498[0] == null
		    && aClass167_Sub2Array10498[1] == null
		    && aClass167_Sub2Array10498[2] == null));
    }
    
    boolean method16468() {
	if (((Class87_Sub1) ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050)
	    .aBool8994) {
	    ((Class243_Sub47_Sub1) this).aClass145Array10499 = new Class145[3];
	    if (((Class87_Sub1)
		 ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050)
		.aBool8875) {
		((Class243_Sub47_Sub1) this).aClass145Array10499[0]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[1]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[2]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\toutCol += texture3D(remap_3, col).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		for (int i = 0; i < 3; i++) {
		    if (((Class243_Sub47_Sub1) this).aClass145Array10499[i]
			== null)
			return false;
		}
	    } else {
		((Class243_Sub47_Sub1) this).aClass145Array10499[0]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[1]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[2]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\toutCol += mix( texture2D(remap_3, coordA), texture2D(remap_3, coordB), UVFrac.z ).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		for (int i = 0; i < 3; i++) {
		    if (((Class243_Sub47_Sub1) this).aClass145Array10499[i]
			== null)
			return false;
		}
	    }
	    return ((Class243_Sub47_Sub1) this).aClass145Array10499 != null;
	}
	return false;
    }
    
    boolean method16469() {
	if (((Class87_Sub1) ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050)
	    .aBool8994) {
	    ((Class243_Sub47_Sub1) this).aClass145Array10499 = new Class145[3];
	    if (((Class87_Sub1)
		 ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050)
		.aBool8875) {
		((Class243_Sub47_Sub1) this).aClass145Array10499[0]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[1]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[2]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\toutCol += texture3D(remap_3, col).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		for (int i = 0; i < 3; i++) {
		    if (((Class243_Sub47_Sub1) this).aClass145Array10499[i]
			== null)
			return false;
		}
	    } else {
		((Class243_Sub47_Sub1) this).aClass145Array10499[0]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[1]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[2]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\toutCol += mix( texture2D(remap_3, coordA), texture2D(remap_3, coordB), UVFrac.z ).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		for (int i = 0; i < 3; i++) {
		    if (((Class243_Sub47_Sub1) this).aClass145Array10499[i]
			== null)
			return false;
		}
	    }
	    return ((Class243_Sub47_Sub1) this).aClass145Array10499 != null;
	}
	return false;
    }
    
    boolean method16497() {
	return ((Class243_Sub47_Sub1) this).aClass145Array10499 != null;
    }
    
    void method16471() {
	if (((Class243_Sub47_Sub1) this).aClass145Array10499 != null) {
	    for (int i = 0;
		 i < ((Class243_Sub47_Sub1) this).aClass145Array10499.length;
		 i++)
		((Class243_Sub47_Sub1) this).aClass145Array10499[i] = null;
	    ((Class243_Sub47_Sub1) this).aClass145Array10499 = null;
	}
    }
    
    void method16473(int i, int i_10_) {
	/* empty */
    }
    
    void method16488(int i, int i_11_) {
	/* empty */
    }
    
    boolean method16467() {
	if (((Class87_Sub1) ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050)
	    .aBool8994) {
	    ((Class243_Sub47_Sub1) this).aClass145Array10499 = new Class145[3];
	    if (((Class87_Sub1)
		 ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050)
		.aBool8875) {
		((Class243_Sub47_Sub1) this).aClass145Array10499[0]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[1]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[2]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\toutCol += texture3D(remap_3, col).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		for (int i = 0; i < 3; i++) {
		    if (((Class243_Sub47_Sub1) this).aClass145Array10499[i]
			== null)
			return false;
		}
	    } else {
		((Class243_Sub47_Sub1) this).aClass145Array10499[0]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[1]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[2]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\toutCol += mix( texture2D(remap_3, coordA), texture2D(remap_3, coordB), UVFrac.z ).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		for (int i = 0; i < 3; i++) {
		    if (((Class243_Sub47_Sub1) this).aClass145Array10499[i]
			== null)
			return false;
		}
	    }
	    return ((Class243_Sub47_Sub1) this).aClass145Array10499 != null;
	}
	return false;
    }
    
    void method16496() {
	if (((Class243_Sub47_Sub1) this).aClass145Array10499 != null) {
	    for (int i = 0;
		 i < ((Class243_Sub47_Sub1) this).aClass145Array10499.length;
		 i++)
		((Class243_Sub47_Sub1) this).aClass145Array10499[i] = null;
	    ((Class243_Sub47_Sub1) this).aClass145Array10499 = null;
	}
    }
    
    void method16476(int i) {
	OpenGL.glUseProgram(0);
	for (int i_12_ = anInt10497; i_12_ >= 0; i_12_--) {
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050
		.method15018(i_12_);
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050.method15019(null);
	}
    }
    
    boolean method16475() {
	return (aFloat10501 == 1.0F
		|| (aFloatArray10502[0] + aFloatArray10502[1]
		    + aFloatArray10502[2]) == 0.0F
		|| (aClass167_Sub2Array10498[0] == null
		    && aClass167_Sub2Array10498[1] == null
		    && aClass167_Sub2Array10498[2] == null));
    }
    
    void method16490(int i) {
	OpenGL.glUseProgram(0);
	for (int i_13_ = anInt10497; i_13_ >= 0; i_13_--) {
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050
		.method15018(i_13_);
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050.method15019(null);
	}
    }
    
    boolean method16457() {
	if (((Class87_Sub1) ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050)
	    .aBool8994) {
	    ((Class243_Sub47_Sub1) this).aClass145Array10499 = new Class145[3];
	    if (((Class87_Sub1)
		 ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050)
		.aBool8875) {
		((Class243_Sub47_Sub1) this).aClass145Array10499[0]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[1]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[2]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler3D remap_1, remap_2, remap_3, remap_4;\n\n"
				 .concat
			     ("void main() {\n\tvec3 col = texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz;\n\tcol = clamp(col,0.0,1.0);\n\tvec3 outCol = col * paramsWeightings.x;\n\t//Clamp the colour coords so we sample correctly\n\tfloat minC = 0.03125; // 0.5/16.0\n\tfloat maxC = 0.96875; // 1.0-(0.5/16.0)\n\tcol = mix(vec3(minC,minC,minC), vec3(maxC,maxC,maxC), col);\n\n\toutCol += texture3D(remap_1, col).rgb * paramsWeightings.y;\n\toutCol += texture3D(remap_2, col).rgb * paramsWeightings.z;\n\toutCol += texture3D(remap_3, col).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		for (int i = 0; i < 3; i++) {
		    if (((Class243_Sub47_Sub1) this).aClass145Array10499[i]
			== null)
			return false;
		}
	    } else {
		((Class243_Sub47_Sub1) this).aClass145Array10499[0]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[1]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		((Class243_Sub47_Sub1) this).aClass145Array10499[2]
		    = (Class145.method3524
		       (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			(new Class155[]
			 { Class155.method3687
			   (((Class243_Sub47_Sub1) this).aClass87_Sub1_10050,
			    35632,
			    ("#extension GL_ARB_texture_rectangle : enable\nuniform vec4 paramsWeightings;\nuniform sampler2DRect sceneTex;\nuniform sampler2D remap_1, remap_2, remap_3, remap_4;\n\nvec3 remap_uv(vec3 in_coord) {\n\tfloat Scale = 15.0 / 16.0;\n\tfloat IntB = floor(in_coord.b * 14.9999) / 16.0;\n\tfloat FracB = in_coord.b * 15.0 - IntB * 16.0;\n\tfloat U = IntB + in_coord.r * Scale / 16.0;\n\tfloat V = in_coord.g * Scale;\n\treturn vec3(U,V,FracB);\n}\n\n"
				 .concat
			     ("void main() {\n\tvec3 outCol = clamp(texture2DRect(sceneTex, gl_TexCoord[0].xy).xyz,0.0,1.0);\n\tvec2 Offset = vec2(0.5 / 256.0, 0.5 / 16.0);\n\tvec3 UVFrac = remap_uv(outCol);\n\tvec2 coordA = Offset + vec2(UVFrac.x , UVFrac.y);\n\tvec2 coordB = coordA + vec2(1.0 / 16.0, 0.0);\n\toutCol *= paramsWeightings.x;\n\n\toutCol += mix( texture2D(remap_1, coordA), texture2D(remap_1, coordB), UVFrac.z ).rgb * paramsWeightings.y;\n\toutCol += mix( texture2D(remap_2, coordA), texture2D(remap_2, coordB), UVFrac.z ).rgb * paramsWeightings.z;\n\toutCol += mix( texture2D(remap_3, coordA), texture2D(remap_3, coordB), UVFrac.z ).rgb * paramsWeightings.w;\n\n\tgl_FragColor = vec4(outCol, 1.0);\n}\n"))) })));
		for (int i = 0; i < 3; i++) {
		    if (((Class243_Sub47_Sub1) this).aClass145Array10499[i]
			== null)
			return false;
		}
	    }
	    return ((Class243_Sub47_Sub1) this).aClass145Array10499 != null;
	}
	return false;
    }
    
    int method16484() {
	return 2;
    }
    
    void method16458() {
	if (((Class243_Sub47_Sub1) this).aClass145Array10499 != null) {
	    for (int i = 0;
		 i < ((Class243_Sub47_Sub1) this).aClass145Array10499.length;
		 i++)
		((Class243_Sub47_Sub1) this).aClass145Array10499[i] = null;
	    ((Class243_Sub47_Sub1) this).aClass145Array10499 = null;
	}
    }
    
    Class90 method16495() {
	return Class90.aClass90_1040;
    }
    
    Class90 method16470() {
	return Class90.aClass90_1040;
    }
    
    boolean method16489() {
	return (aFloat10501 == 1.0F
		|| (aFloatArray10502[0] + aFloatArray10502[1]
		    + aFloatArray10502[2]) == 0.0F
		|| (aClass167_Sub2Array10498[0] == null
		    && aClass167_Sub2Array10498[1] == null
		    && aClass167_Sub2Array10498[2] == null));
    }
    
    boolean method16486() {
	return (aFloat10501 == 1.0F
		|| (aFloatArray10502[0] + aFloatArray10502[1]
		    + aFloatArray10502[2]) == 0.0F
		|| (aClass167_Sub2Array10498[0] == null
		    && aClass167_Sub2Array10498[1] == null
		    && aClass167_Sub2Array10498[2] == null));
    }
    
    Class90 method16498() {
	return Class90.aClass90_1040;
    }
    
    boolean method16859() {
	return (((Class87_Sub1)
		 ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050)
		.aBool8994);
    }
    
    void method16477(int i) {
	OpenGL.glUseProgram(0);
	for (int i_14_ = anInt10497; i_14_ >= 0; i_14_--) {
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050
		.method15018(i_14_);
	    ((Class243_Sub47_Sub1) this).aClass87_Sub1_10050.method15019(null);
	}
    }
    
    boolean method16472() {
	return ((Class243_Sub47_Sub1) this).aClass145Array10499 != null;
    }
}
