Results 1 to 4 of 4

Thread: Render DepthMap with FBOs

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    21

    Render DepthMap with FBOs

    Hi,
    I want to render the DepthMap with FBOs, but when I render the scene, the result is a texture with the background color and the texture of the ColorAttachement0 is darker than the real image.
    I've tried several tutorials but I don't know what I'm doing wrong.

    I use the OpenTK framework.

    It would be realy nice if anyone could help me.

    The Code: http://codepad.org/4cOIutjD

  2. #2
    Senior Member Regular Contributor
    Join Date
    Oct 2010
    Location
    France
    Posts
    458

    Re: Render DepthMap with FBOs

    Use a depth attachment with your fbo, and render to this.

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2011
    Posts
    21

    Re: Render DepthMap with FBOs

    I can render the DepthMap.
    But the DepthMap is very bad, it seems to be a constant gray value. Can I set some properties for the DepthMap so that the gray values will be more different?

    If I render all of my model in the viewport, there is a white DepthMap although the Depth difference of the model is more than 100, so there must be a noticeable DepthMap and no white respectively light grey DepthMap.

    Here is a screenshot of the DepthMap

  4. #4
    Senior Member OpenGL Guru
    Join Date
    Oct 2004
    Posts
    4,649

Similar Threads

  1. Render to Texture using FBOs not working
    By Cloudy McStrife in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 11-14-2015, 06:05 AM
  2. Render to Texture using FBOs not working
    By Cloudy McStrife in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 11-12-2015, 05:16 PM
  3. Render bugs after recreating FBOs
    By Ident in forum OpenGL: Advanced Coding
    Replies: 7
    Last Post: 09-20-2011, 01:52 PM
  4. Render to Depth Texture using FBOs is Slow
    By animeaholic in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 11-30-2007, 04:49 PM
  5. How do I render the Depth Buffer using FBOs?
    By CelticDaddio in forum OpenGL: Advanced Coding
    Replies: 6
    Last Post: 03-29-2006, 09:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean