Examples of FrameBuffer


Examples of aspect.render.FrameBuffer

        ///diamondSquare(t, w);
        //NoiseTest.generateTerrain(t, w);
        FFTTest.generateTerrain(t, w);

        try {
            fbo = new FrameBuffer(1024, 1024, p);
            fbo.setRepeat(false);
            fbo.setFilter(GL11.GL_NEAREST, GL11.GL_NEAREST);
            Shader vert = Shader.loadPrebuilt("texture.vert", Shader.Type.VERTEX);
            Shader frag = loadShader(new File("shaders/test.frag"), Shader.Type.FRAGMENT);
            post = new ShaderProgram(vert, frag);
View Full Code Here

Examples of aspect.render.FrameBuffer

        Shader fragment2 = new Shader(new File("shaders/example2.frag"), Type.FRAGMENT);
       
        shader1 = new ShaderProgram(vertex, fragment1);
        shader2 = new ShaderProgram(vertex, fragment2);
        try {
            frameBuffer = new FrameBuffer(128, 128, DEFAULT_CAMERA);
        } catch (Exception ex) {
            Logger.getLogger(ShaderDemo.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
View Full Code Here

Examples of com.badlogic.gdx.graphics.glutils.FrameBuffer

  private int ownedW, ownedH;

  /** Creates a new ping-pong buffer and owns the resources. */
  public PingPongBuffer (int width, int height, Format frameBufferFormat, boolean hasDepth) {
    ownResources = true;
    owned1 = new FrameBuffer(frameBufferFormat, width, height, hasDepth);
    owned2 = new FrameBuffer(frameBufferFormat, width, height, hasDepth);
    set(owned1, owned2);
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.glutils.FrameBuffer

      blur.setPasses(1);
      blur.setAmount(1f);
      // blur.setType( BlurType.Gaussian3x3b ); // high defocus
      blur.setType(BlurType.Gaussian3x3); // modern machines defocus
    } else {
      buffer = new FrameBuffer(PostProcessor.getFramebufferFormat(), fboWidth, fboHeight, false);
    }

    combine = new Combine();
    crt = new CrtScreen(barrelDistortion, mode, effectsSupport);
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.glutils.FrameBuffer

    if (fboWidth <= 0)
      fboWidth = 1;
    if (fboHeight <= 0)
      fboHeight = 1;
    frameBuffer = new FrameBuffer(Format.RGBA8888, fboWidth,
        fboHeight, false);
    pingPongBuffer = new FrameBuffer(Format.RGBA8888, fboWidth,
        fboHeight, false);

    lightMapMesh = createLightMapMesh();

    shadowShader = ShadowShader.createShadowShader();
View Full Code Here

Examples of com.badlogic.gdx.graphics.glutils.FrameBuffer

    if (fboWidth <= 0)
      fboWidth = 1;
    if (fboHeight <= 0)
      fboHeight = 1;
    frameBuffer = new FrameBuffer(Format.RGBA8888, fboWidth,
        fboHeight, false);
    pingPongBuffer = new FrameBuffer(Format.RGBA8888, fboWidth,
        fboHeight, false);

    lightMapMesh = createLightMapMesh();

    shadowShader = ShadowShader.createShadowShader();
View Full Code Here

Examples of com.badlogic.gdx.graphics.glutils.FrameBuffer

      } else {
        format = Format.RGB565;
      }
    }
    if (fbo == null) {
      frameBuffer = new FrameBuffer(format, Gdx.graphics.getWidth(),
          Gdx.graphics.getHeight(), hasDepth);
    } else {
      frameBuffer = fbo;
    }

    pingPongBuffer1 = new FrameBuffer(format, FBO_W, FBO_H, false);

    pingPongBuffer2 = new FrameBuffer(format, FBO_W, FBO_H, false);

    original = frameBuffer.getColorBufferTexture();
    pingPongTex1 = pingPongBuffer1.getColorBufferTexture();
    pingPongTex2 = pingPongBuffer2.getColorBufferTexture();
View Full Code Here

Examples of com.badlogic.gdx.graphics.glutils.FrameBuffer

      } else {
        format = Format.RGB565;
      }
    }
    if (fbo == null) {
      frameBuffer = new FrameBuffer(format, Gdx.graphics.getWidth(),
          Gdx.graphics.getHeight(), hasDepth);
    } else {
      frameBuffer = fbo;
    }

    pingPongBuffer1 = new FrameBuffer(format, FBO_W, FBO_H, false);

    pingPongBuffer2 = new FrameBuffer(format, FBO_W, FBO_H, false);

    original = frameBuffer.getColorBufferTexture();
    pingPongTex1 = pingPongBuffer1.getColorBufferTexture();
    pingPongTex2 = pingPongBuffer2.getColorBufferTexture();
View Full Code Here

Examples of com.jme3.texture.FrameBuffer

        offView = renderManager.createPreView("Offscreen View!", offCamera);
        offView.setClearFlags(true, true, true);
        offView.setBackgroundColor(ColorRGBA.DarkGray);

        // create offscreen framebuffer
        FrameBuffer offBuffer = new FrameBuffer(1024, 256, 1);

        //setup framebuffer's cam
        offCamera.setFrustumPerspective(45f, 4f, 1f, 1000f);
        offCamera.setLocation(new Vector3f(0f, 0f, -5f));
        offCamera.lookAt(new Vector3f(0f, 0f, 0f), Vector3f.UNIT_Y);

        //setup framebuffer's texture
        Texture2D offTex = new Texture2D(1024, 256, Format.RGBA8);
        offTex.setMinFilter(Texture.MinFilter.Trilinear);
        offTex.setMagFilter(Texture.MagFilter.Bilinear);

        //setup framebuffer to use texture
        offBuffer.setDepthBuffer(Format.Depth);
        offBuffer.setColorTexture(offTex);
       
        //set viewport to render to offscreen framebuffer
        offView.setOutputFrameBuffer(offBuffer);

        // setup framebuffer's scene
View Full Code Here

Examples of com.jme3.texture.FrameBuffer

     * @param r
     * @param sceneFb
     */
    private void renderFilterChain(Renderer r, FrameBuffer sceneFb) {
        Texture2D tex = filterTexture;
        FrameBuffer buff = sceneFb;
        boolean msDepth = depthTexture != null && depthTexture.getImage().getMultiSamples() > 1;
        for (int i = 0; i < filters.size(); i++) {
            Filter filter = filters.get(i);
            if (filter.isEnabled()) {
                if (filter.getPostRenderPasses() != null) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.