public Hkt(int N, int L) { this.N = N; this.L = L; shader = HktShader.getInstance(); imageDyCoeficcients = new Texture2DStorageRGBA32F(N,N,1); imageDxCoefficients = new Texture2DStorageRGBA32F(N,N,1); imageDzCoefficients = new Texture2DStorageRGBA32F(N,N,1); }
public Texture2DStorageRGBA32F(int width, int height, int levels) { super(GL_TEXTURE_2D, width, height); bind(); allocateStorage2D(levels, GL_RGBA32F); unbind(); }
public FFT(int N, int L, float amplitude, Vec2f direction, float intensity, float capillarSupressFactor){ this.N = N; log_2_N = (int) (Math.log(N)/Math.log(2)); twiddleFactors = new TwiddleFactors(N); h0k = new H0k(N, L, amplitude, direction, intensity, capillarSupressFactor); hkt = new Hkt(N, L); butterflyShader = ButterflyShader.getInstance(); inversionShader = InversionShader.getInstance(); pingpongTexture = new Texture2DStorageRGBA32F(N,N,1); Dy = new Texture2DStorageRGBA32F(N,N,1); Dx = new Texture2DStorageRGBA32F(N,N,1);; Dz = new Texture2DStorageRGBA32F(N,N,1); }
public TwiddleFactors(int N) { this.N = N; bitReversedSSBO = new GLShaderStorageBuffer(); bitReversedSSBO.addData(initBitReversedIndices()); log_2_N = (int) (Math.log(N)/Math.log(2)); shader = TwiddleFactorsShader.getInstance(); texture = new Texture2DStorageRGBA32F(log_2_N,N,1); }
public NormalRenderer(int N){ this.N = N; computeShader = NormalMapShader.getInstance(); normalmap = new Texture2DStorageRGBA32F(N, N, (int) (Math.log(N)/Math.log(2))); normalmap.bind(); normalmap.trilinearFilter(); normalmap.unbind(); }
public H0k(int N, int L, float amplitude, Vec2f direction, float intensity, float capillarSupressFactor) { this.N = N; this.L = L; this.direction = direction; this.amplitude = amplitude; this.intensity = intensity; this.capillarSupressFactor = capillarSupressFactor; shader = H0kShader.getInstance(); imageH0k = new Texture2DStorageRGBA32F(N,N,1); imageH0minusK = new Texture2DStorageRGBA32F(N,N,1); noise0 = new Texture2DNoFilter("textures/noise/Noise256_0.jpg"); noise1 = new Texture2DNoFilter("textures/noise/Noise256_1.jpg"); noise2 = new Texture2DNoFilter("textures/noise/Noise256_2.jpg"); noise3 = new Texture2DNoFilter("textures/noise/Noise256_3.jpg"); }
public FractalMapGenerator(int N) { this.N = N; shader = FractalMapShader.getInstance(); fractalmap = new Texture2DStorageRGBA32F(N,N,(int) (Math.log(N)/Math.log(2))); fractalmap.bind(); fractalmap.bilinearFilter(); fractalmap.unbind(); fractalmap.getMetaData().setWidth(N); fractalmap.getMetaData().setHeight(N); }