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: RealtimeSlave

Search: Search took 0.00 seconds.

  1. Thanks god I just found out what I am doing...

    Thanks god I just found out what I am doing wrong!!! :D

    The problem was, that I calculated Depth in the vertex shader and then passed it as varying to the fragment shader!

    This of course is...
  2. I just found a way to get a dynamic bias which...

    I just found a way to get a dynamic bias which seems to reduce the issues:
    1312

    float Bias = 0.5 * (1.0 - clamp(Depth, 0.0, 1.0));


    edit Hm no not really, the issue is still there for...
  3. Shadow cube map: glPolygonOffset does not help?

    Hello,

    I have an omni directional light source with a shadow cube map:
    1310

    Works fine so far BUT... as you can see there are some artifacts on the front face of the box (marked red in the...
  4. Probably I just found the answer here:...

    Probably I just found the answer here:
    http://stackoverflow.com/questions/10786951/omnidirectional-shadow-mapping-with-depth-cubemap

    Can somebody confirm this is how it is done usually?
  5. Shadow cube map: Comparing the depth value

    Hello,

    I have a scene rendered into the six sides of a depth cube map from an omni light position using a 90°FOV.

    So far so good.

    Now in the fragment shader I somehow need to compare
    A) the...
  6. I see, thanks! Alright, got it! Thanks

    I see, thanks!




    Alright, got it! Thanks
  7. Thanks for the clarification!

    Thanks for the clarification!
  8. glDrawBuffer/glReadBuffer framebuffer state

    Hello,

    are changes made with glDrawBuffer or glDrawBuffers stored in the state of current GL_DRAW_FRAMEBUFFER
    and changes made with glReadBuffer stored in the state of current...
  9. glDrawBuffer does not accept GL_COLOR_ATTACHMENT0 but glReadBuffer does?

    Hello,

    I see lots of code around the web where the following is done:


    glDrawBuffer(GL_COLOR_ATTACHMENT0);

    But looking into the manual glDrawBuffer (in contrast to glReadBuffer and...
  10. So basically I would like to render each side of...

    So basically I would like to render each side of the cube map as a 2D image to the screen but I don't know how to do this since the cube map handle is a GL_TEXTURE_CUBE_MAP and not a GL_TEXTURE_2D.
  11. Hi, thanks. I already have the shader for...

    Hi,

    thanks. I already have the shader for depth buffer linearization.

    My question was more about how to render each side of the cube because
    the cube texture was generated with...
  12. Easiest way to render only one side of a cub map for debugging purposes

    Hello,

    I created a shadow cube map consisting of 6 frame buffer objects (with only a depth texture attachment), one for each side:


    glFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT,...
  13. Replies
    0
    Views
    825

    TBN Matrix for smoothed vertices

    Hello,

    I hope you can help me with the following two questions regarding the TBN matrix.

    Right now I construct the TBN matrix by calculating the tangent for each vertex and uploading the...
  14. Thank you all for your comments and suggestions....

    Thank you all for your comments and suggestions.

    I'll skip further looks into stencil shadows in this case and instead try to implement omnidirectional shadow mapping:...
  15. Hm at least Doom 3 was using stencil shadows but...

    Hm at least Doom 3 was using stencil shadows but I have no clue how they deal with transparent objects.

    I also find it strange that I find NOTHING useful when googling for "stencil shadows" +...
  16. Many thanks for sharing your thoughts. I wonder...

    Many thanks for sharing your thoughts. I wonder how the game industry is
    doing it (crytek, id & Co) when it comes to stencil shadows :/

    Ok would be that the transparent objects don't cast shadows...
  17. Stencil shadows, ambient pass and transparent objects

    Hello,

    as explained in this article...
    http://www.gamasutra.com/view/feature/2942/the_mechanics_of_robust_stencil_.php
    ...I would like to split my lighting into ambient pass and a pass for...
  18. I just noticed that I did a mistake in my high...

    I just noticed that I did a mistake in my high level code when switching to orthographic projection.
    The result was that my debug output showed me not normalized values in s_Position and I started...
  19. Normalized device coordinates for world coordinates using orthographic projection

    Hi there,

    let's say I have world coordinates stored in a variable Position and I want to calculate
    the Normalized Device Coordinates (NDC) for this Position on the CPU in C++ code.

    Using a...
  20. Got it, thanks!

    Got it, thanks!
  21. Thank you all for the comments! Since I have...

    Thank you all for the comments!

    Since I have only two lines in the if-block it might be possible that these predicated instructions are used.

    Are if-statements without an else-block generally...
  22. Performance: alternative for if ( ... ) { }

    Hi there,

    some years ago I read that if-statements should be avoided in shader source to get better performance.



    if (UniformTwoSided && Dot < 0.0)
    {
    Dot *= Flip;
    FragNormal *= Flip;
  23. Replies
    6
    Views
    2,800

    Re: Normal Map Filtering

    Wouldn't be the correct way to normalize the normals
    in the shader after reading them with texture2D()?

    I mean even if they are normalized in the mip maps
    the trilinear interpolation between the...
Results 1 to 23 of 23