/* */ package org.renderer; /* */ /* */ import java.awt.Dimension; /* */ import org.lwjgl.opengl.GL11C; /* */ import org.lwjgl.opengl.GL13C; /* */ import org.lwjgl.opengl.GL20C; /* */ import org.shader.ShaderProgram; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class PostProcessor /* */ extends ShaderProgram /* */ { /* */ private int fboTextureLocation; /* */ private int resolutionLocation; /* */ private int useFXAALocation; /* */ private int useDoFLocation; /* */ private int useGrainLocation; /* */ /* */ public PostProcessor() throws AssertionError { /* 34 */ super("/data/shader/PostProcessor"); /* */ /* */ /* */ /* 38 */ this.fboTextureLocation = GL20C.glGetUniformLocation(this.program, "fboTexture"); /* 39 */ this.resolutionLocation = GL20C.glGetUniformLocation(this.program, "resolution"); /* */ /* */ /* 42 */ this.useFXAALocation = GL20C.glGetUniformLocation(this.program, "boolFilterFXAA"); /* 43 */ this.useDoFLocation = GL20C.glGetUniformLocation(this.program, "boolFilterDoF"); /* 44 */ this.useGrainLocation = GL20C.glGetUniformLocation(this.program, "boolFilterGrain"); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ public void loadData(Dimension size, FBO fbo, PostProcessConfig config) { /* 53 */ GL20C.glUniform2f(this.resolutionLocation, size.width, size.height); /* */ /* */ /* 56 */ GL20C.glUniform1i(this.useFXAALocation, config.getFilterFXAAAsInteger()); /* 57 */ GL20C.glUniform1i(this.useDoFLocation, config.getFilterDoFAsInteger()); /* 58 */ GL20C.glUniform1i(this.useGrainLocation, config.getFilterGrainAsInteger()); /* */ /* */ /* 61 */ GL13C.glActiveTexture(33984); /* 62 */ GL11C.glBindTexture(3553, fbo.getTextureHandle()); /* 63 */ GL20C.glUniform1i(this.fboTextureLocation, 0); /* */ } /* */ /* */ /* */ /* */ /* */ /* */ public final void close() { /* 71 */ super.close(); /* */ } /* */ } /* Location: /home/teridax/Projects/Gytebot/GYTEBOT.jar!/org/renderer/PostProcessor.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.1.3 */