Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 15

Thread: Heat map visualization shader help please

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #11
    Senior Member OpenGL Guru Dark Photon's Avatar
    Join Date
    Oct 2004
    Quote Originally Posted by JSwigart View Post
    I would have thought that colorization via a fragment shader would not be able to z-fight, but you can see some z fighting when zoomed out. Is there something that can cause z fighting like this with shader work?
    Hmm.. Ok, just to verify, you're still doing the frag shader loop over all events, and this is firing as you rasterize the poly surfaces of your level, right? Also, you don't have nearly coincident surfaces do you?

    Try pushing your near clip out and/or pulling your far clip in (glFrustum) -- mainly the former. If you don't see any changes in the artifact, it's not z-fighting as in normal depth buffer fighting.

    So the next question that arises is is it a function of the weight computation algorithm your are using. For instance, if your level floors are exactly 8 meters apart, are you using the number 8 as a hard cut-off for the influence distance of an event on a fragment? If so, could be that the fighting is actually there in your shader logic. For instance, instead of using a step function (e.g. step()), try smoothstep() or similar which you can use to fade out the influence over a distance range.

    In any case, try varying your weighting function to see if it has an influence over the artifact.
    Last edited by Dark Photon; 11-12-2013 at 06:53 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