public Texture2DStorageRGBA16F(int width, int height, int levels) { super(GL_TEXTURE_2D, width, height); bind(); allocateStorage2D(levels, GL_RGBA16F); unbind(); }
public SplatMapGenerator(int N) { this.N = N; shader = SplatMapShader.getInstance(); splatmap = new Texture2DStorageRGBA16F(N,N,(int) (Math.log(N)/Math.log(2))); splatmap.bind(); splatmap.bilinearFilter(); splatmap.unbind(); }
public MotionBlur() { pixelVelocityTexture = new Texture2DNoFilterRGBA32F(BaseContext.getWindow().getWidth(), BaseContext.getWindow().getHeight()); motionBlurSceneTexture = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth(), BaseContext.getWindow().getHeight(),1); pixelVelocityShader = PixelVelocityShader.getInstance(); motionBlurShader = MotionBlurShader.getInstance(); }
sceneBrightnessTexture = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth(), BaseContext.getWindow().getHeight(), 1); sceneBrightnessTexture.bind(); additiveBlendBloomTexture = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth(), BaseContext.getWindow().getHeight(), 1); bloomSceneTexture = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth(), BaseContext.getWindow().getHeight(), 1); verticalBloomBlurTexture_div2 = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth()/2, BaseContext.getWindow().getHeight()/2, 1); verticalBloomBlurTexture_div2.bind(); horizontalBloomBlurTexture_div4 = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth()/4, BaseContext.getWindow().getHeight()/4, 1); horizontalBloomBlurTexture_div4.bind(); verticalBloomBlurTexture_div4 = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth()/4, BaseContext.getWindow().getHeight()/4, 1); verticalBloomBlurTexture_div4.bind(); horizontalBloomBlurTexture_div8 = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth()/8, BaseContext.getWindow().getHeight()/8, 1); horizontalBloomBlurTexture_div8.bind(); verticalBloomBlurTexture_div8 = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth()/8, BaseContext.getWindow().getHeight()/8, 1); verticalBloomBlurTexture_div8.bind();
public DepthOfFieldBlur() { horizontalBlurShader = DepthOfFieldHorizontalBlurShader.getInstance(); verticalBlurShader = DepthOfFieldVerticalBlurShader.getInstance(); fullScreenQuad = new FullScreenQuad(); horizontalBlurSceneTexture = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth(), BaseContext.getWindow().getHeight(),1); verticalBlurSceneTexture = new Texture2DStorageRGBA16F(BaseContext.getWindow().getWidth(), BaseContext.getWindow().getHeight(),1); lowResSceneSampler = new Texture2DBilinearFilterRGBA16F((int)(BaseContext.getWindow().getWidth()/1.2f), (int)(BaseContext.getWindow().getHeight()/1.2f)); lowResSceneSampler.bind(); lowResSceneSampler.clampToEdge(); lowResSceneSampler.unbind(); lowResFbo = new GLFramebuffer(); lowResFbo.bind(); lowResFbo.createColorTextureAttachment(lowResSceneSampler.getHandle(), 0); lowResFbo.checkStatus(); lowResFbo.unbind(); }