Results 1 to 8 of 8

Thread: Forward Renderer With Cubeshadowmaps.

  1. #1

    Forward Renderer With Cubeshadowmaps.

    Hi all

    Description:
    Inspired by the movie by Sascha on his site http://www.saschawillems.de/ I decided to write my own little forward renderer. This demo does simple pointlights with cube shadowmapping. I didn`t add parallax or normal mapping to keep it simple. I use rgba cubemaps in which I decode the depth value because like Sascha I couldn`t get the depth cubemaps and fbo`s to work properly. This demo has 5 lights of which one is dynamicly updated each frame. Each extra light requires one extra pass. The demo can probebly be optimised by handeling more then one light in the shader and clipping the drawing of a light with a scissor test.

    Controls:
    WASD+Mouse : Movement
    F1 : Wireframe
    F2 : Lighting only
    F3 : Show dynamic updated cubemap
    F4 : Switch between FBO or glCopyTexSubImage2D for the cubemap. Note that glCopyTexSubImage2D wont work on nvidia for some reason. Not sure why but the dynamic shadow doesnt get copied anymore.

    Inifile:
    In the settings.ini you can some properties.
    1024 = width
    768 = height
    0 = fullscreen
    1 = 1 = Start with FBO and 0 is start with glCopyTexSubImage2D. When using 0 on nvidia you dont get shadows as explained by F4
    512 = Size of the shadowmap. When using 0 in the above make sure this is smaller then the width and height.

    And here is a little movie:
    http://www.youtube.com/watch?v=fts9RFMUE8Y

    And of course the download link:
    http://www.genesisdevice.net/downloa...drendering.zip

    Source like always is under LGPL.

    Greetz Luuk

  2. #2

    Re: Forward Renderer With Cubeshadowmaps.

    Great stuff! will take a look at the source ASAP.

    Edit: I tried to lower the quality of the shadows by setting ShadowSize to a lower value, but It doesn't seem to affect anything. Also, when I zoom in on the shadow edge, I see a straight line (no aliasing). How is that possible? :?
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  3. #3

    Re: Forward Renderer With Cubeshadowmaps.

    didn't work on my Gforce 5200FX ,

  4. #4

    Re: Forward Renderer With Cubeshadowmaps.

    I guess this demo needs at least a card from the 6xxx or 7xxx series. Your card just doesn't have the required capabilities.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  5. #5

    Re: Forward Renderer With Cubeshadowmaps.

    I only tested it on geforce 6 and up and the radeon 5xxx series. Does the log indicate any error?

    Also I have uploaded a new version. I have improved the shaders a bit, cleaned up the code and added spotlights.

    Grab it here:
    http://www.genesisdevice.net/downloa...drendering.zip

    Greetz

    Luuk

  6. #6

    Re: Forward Renderer With Cubeshadowmaps.

    as far as i know 5200FX suport Opengl 2
    there is no error message apeared , but the demo stoped in shader loading and show ( send error raport , don't send ) . after pressing the button ( don't send ) some EAccessViolation error message apear , thats all

    the log file looks like this
    Code:
    Log started at 17/03/2010, 18:46:31
    
    INIFILE: Loaded settings
    WINDOW: Created window
    TEXTURE: Model\floor_diffuse.jpg loaded
    TEXTURE: Model\wall_diffuse.jpg loaded
    TEXTURE: Model\ceiling_diffuse.jpg loaded
    TEXTURE: Model\pillars_diffuse.jpg loaded
    OBJMODEL: Model\Room.obj loaded
    SHADER: Shaders\PointLight loaded
    SHADER: Shaders\AmbientPass loaded
    SHADER: Shaders\DiffusePass loaded
    SHADER: Shaders\ShadowPass loaded
    SHADER: Shaders\ShadowDebug loaded
    
    Log ended at 17/03/2010, 18:46:39

  7. #7

    Re: Forward Renderer With Cubeshadowmaps.

    Indeed the 5200FX should support OGL 2.0 and without any error its hard to pinpoint the problem.

  8. #8

    Re: Forward Renderer With Cubeshadowmaps.

    @Virtual: You could run from the sources in Delphi and see where it goes wrong.
    Just a matter of putting some breakpoints in and run a few times.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •