Results 1 to 2 of 2

Thread: Variance Shadow Mapping - no shadow visible after using gaussian blur

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2017
    Posts
    10

    Variance Shadow Mapping - no shadow visible after using gaussian blur

    I tried to implement variance shadow maps but got stuck while doing gaussian blurring. In the code, I'm using two custom framebuffers with a single RG32F texture for each one. One framebuffer is used for rendering the scene to depth map during the first pass of my main rendering loop, and the second one as an intermediate to store the blurred texture. I'm trying to filter my depth map using gaussian blur in two passes: first i filter the map horizontally and then vertically. When filtering horizontally i pass my original depth map to the 2nd framebuffer to blur and save it. Then to filter vertically i use the texture i just stored in the 2nd framebuffer and pass it back to my 1st custom framebuffer so i can blur and save it again. After the blurring process i do my second render pass in main rendering loop to draw the scene to the default framebuffer and do my lightning and render shadows as per ushe. The issue is that after i blur my depth map, with said gaussian technique, no shadows are rendered on screen. But if i don't blur the map, and only use GL_LINEAR to filter it, shadows are drawn.

    Here are the images of my depth maps rendered to screen: Images

    Image C pictures non-filtered depth map rendered to screen and image D shows that the shadows are rendered using the image A's depth map. Image B and A show how my depth maps look after i filter them with only horizontal gaussian blur, and then both horizontal and vertical blur respectively.

    So i guess my depth maps in B are A are too bright. Do you reccomend that i take the blurred depth map and adjust it's values to be a bit darker so shadows could be rendered? Or will i just be negating my blurring by doing this? Any help is appreciated! Thanks in advance!

  2. #2
    Junior Member Newbie
    Join Date
    Apr 2017
    Posts
    10
    It turns out those "blurred" depth maps i created aren't supposed to be any lighter than the original non-filtered depth map, as can be seen on this page http://www.nutty.ca/?page_id=352&link=shadow_map in the Theory tab, under the section VSM. That means my problem isn't caused by my depth rendering and light rendering shaders, but by my blurring shaders and/or my blurring setup in main.cpp.

    i'll update soon

Similar Threads

  1. Variance shadow mapping with Gaussian blur
    By blaidd in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 03-31-2016, 12:43 AM
  2. Variance shadow mapping: artifacts when using filtered shadow map
    By Vexator in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 03-18-2016, 03:29 AM
  3. variance shadow mapping and mipmapping
    By Triangle in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-18-2013, 07:36 AM
  4. Need help with Variance Shadow Mapping technique
    By i.Dark_Templar in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 11-29-2012, 04:22 AM
  5. Shadow projection mapping - ATI clamp bug & how to blur shadow
    By noisecirme in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 12-16-2003, 09:18 AM

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