Interesting transparency / effect / 3D interaction

0 favourites
  • 2 posts
From the Asset Store
Basketball 3D
$7.50 USD
50% off
Template for a basketball game with a 3D aspect (illusion of 3D)
  • This is an interesting and complicated problem based on the C3 3D render and how the first fragment shader handles transparency for 3D rendering, intermediate renders, depth buffer and fog render.

    Tech details below, with a trace of the C3 rendering.

    This is probably not exactly correct, but I think it is something along these lines.

    Some more 3D transparency 'fun', when rendering effects like outline, the first render to an intermediate buffer writes to the depth buffer, but since the outline is not enabled yet, the area of the outline does not write to the z buffer. Later when the effect is rendered into the frame buffer the outline is applied, but the z values from the intermediate render are not set in the outline region (they are 1, max distance). Later when the fog (?) is rendered, even though it should be behind the zombie (and the outline) with a lower z, it renders 'over' the outline at the bottom, because the 'z' is not set for the outline. The outline for around the zombie against the wall works, because the wall is rendered first before the zombie and sets z values, so when the fog (?) is rendered later it does not write over the pixels. Whew, hmmm how to fix.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Ah, I think it not an issue of them not getting rendered, it is the issue of the depth value behind the effect outline pixel being 1, so the fog effect goes to the maximum value and the red outline is mixed to the full fog color.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)