Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Search:

Type: Posts; User: TheKaiser

Search: Search took 0.00 seconds.

  1. Replies
    11
    Views
    480

    I'm not doing any object culling, but I'm not...

    I'm not doing any object culling, but I'm not adjusting the frustrum either to fit objects within it either. I tried simply multiplying the frustrum size by two and it seemed to help abit, but the...
  2. Replies
    11
    Views
    480

    You are right, it works just fine using the...

    You are right, it works just fine using the values from CalculateShadowmapCascades() without any other modification

    So I guess the original problem I had didnt have to do with that.

    I've got...
  3. Replies
    11
    Views
    480

    Isn't the resulting corners in world-space, after...

    Isn't the resulting corners in world-space, after multiplying by inverse viewProj matrix and dividing by W?



    OK, as eye-space originates from origo and looks down the -Z axis, {-6, -12, -18,...
  4. Replies
    11
    Views
    480

    I know it's confusing, I'm using the term "split...

    I know it's confusing, I'm using the term "split distances" in two places, the first one (which I assumed you were refering to in your first post and code) is this:


    void...
  5. Replies
    11
    Views
    480

    I was talking about the split distances used for...

    I was talking about the split distances used for the comparison in the shader; I already have the computation of split distances working.

    For example, here's the lighting fragment shader I use:
    ...
  6. Replies
    11
    Views
    480

    Cascaded shadow mapping and split values

    Reposting, as the last topic is bugged and cant be edited.

    I'm having issues where shadows vanish at certain angles and I want to ascertain I am using the correct values to determine the split...
  7. Cascaded shadow mapping and determining the split

    Reposting, as previous topic seems to have imploded.

    For most of the part, the cascaded shadow mapping works as intended, but at certain angles shadows are cut. I believe it might be because of...
  8. Alright, so I've filled the depth maps for each...

    Alright, so I've filled the depth maps for each split.. now, when doing the fragment shader for the lighting stage, it strikes me, what matrix do I send to the shader? I am using deferred...
  9. Doing the inverse camera view-projection and then...

    Doing the inverse camera view-projection and then dividing by W, dosn't that put the frustrum corners in world space?

    And once I have the cameras frustrum, now I want to split this into...
  10. Ok - do I use the cameras view matrix, and then...

    Ok - do I use the cameras view matrix, and then for each split generate a new perspective projection matrix, using the split range as the near/far dist?

    Something like:


    Mat4 viewMatrix =...
  11. The "view frustrum" you mention is the cameras...

    The "view frustrum" you mention is the cameras view-projection matrix right? Is there any way to "chop up" the cameras view-projection matrix for each of the cascade ranges or do you have to...
  12. I've been looking at the article, and one thing I...

    I've been looking at the article, and one thing I don't understand is what is a "crop matrix" they talk about and what is it used for?
  13. Cascaded shadow mapping and GL_TEXTURE_2D_ARRAY?

    I've got basic directional shadow mapping working and now I'm looking into improving this using technique called "Cascaded Shadow Mapping", where you use several depth textures to get better quality...
  14. Thank you, it looks better now, but I still have...

    Thank you, it looks better now, but I still have a problem.

    Just before the camera leaves the extent of the shadows of the models, the shadows sometimes gets wierd artifacts, like very stretched...
  15. If I keep the position in the center of the box,...

    If I keep the position in the center of the box, won't the shadows be skewed due to the light being too close-up with the objects?
  16. Directional light and shadow mapping view/projection matrices

    I'm having trouble implementing shadow mapping for directional lights (lights with a light direction but no defined position; such as the sun).
    I managed to get spotlights shadow mapping working in...
  17. Directional light and shadow mapping view/projection matrices

    I'm having trouble implementing shadow mapping for directional lights (lights with a light direction but no defined position; such as the sun).
    I managed to get spotlights shadow mapping working in...
  18. Replies
    15
    Views
    1,981

    I managed to get it working using the...

    I managed to get it working using the sampler2Dshadow and the following adjustments:


    const std::string gDirLightFragmentShader =
    "#version 430 ...
  19. Replies
    15
    Views
    1,981

    I made the matrix bias multiplication with the...

    I made the matrix bias multiplication with the light view-projection matrix before the shader execution and removed the added shadow bias constant, and here's the result:
    ...
  20. Replies
    15
    Views
    1,981

    Alright, will check that. I'd like to add all...

    Alright, will check that.
    I'd like to add all depth values sampled from the shadowmap appear to be in 0.97+; must be inconsistent with the 2nd picture?
  21. Replies
    15
    Views
    1,981

    UnifDirLightPass.mVPMatrix * vec4(worldPos, 1.0)...

    UnifDirLightPass.mVPMatrix * vec4(worldPos, 1.0)

    There is nothing wrong with the order of the following matrix multiplication? It gives the same result as P * V * W?



    Could you elaborate on...
  22. Replies
    15
    Views
    1,981

    I have done that, as I wrote it in the OP :p the...

    I have done that, as I wrote it in the OP :p the first image you see is the lighting shader I posted *except* the "shadowFactor" variable is commented-out in the return statement. Look at the cube in...
  23. Replies
    15
    Views
    1,981

    What do you mean 'as the edge' of the shadow...

    What do you mean 'as the edge' of the shadow map/gbuffer texture? Dosn't that depend on where the camera is and looking?

    I use the following sampler properties to sample the depth map:


    ...
  24. Replies
    15
    Views
    1,981

    In the third image, you can see some distortion...

    In the third image, you can see some distortion on the far end of the ground plane; and the last image shows that distortion close-up, and shows that the distortion is actually that only the edges...
  25. Replies
    15
    Views
    1,981

    Spotlight and shadowmapping issues

    I'm trying to implement shadowmapping for spotlights in an OpenGL 4.3 deferred renderer. The problem is described below.

    Here is the scene from the cameras POV, with shadow calculations...
Results 1 to 25 of 25