Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Can you please send me a simple project with this issue? I tried it myself in a simple project using billboard and transparent background and it looked ok, so I imagine that there is something different between our projects that I need to take a look at.

Thank you. Your outline effect is best, works well also when i preview game in small window. (Rojohound outline effect have glitches in small window)


check this file: https://www.dropbox.com/s/vay2llgwp1scbnh/3doutline.c3p?dl=0

i think you should take look at layers

Thanks for the example, this is an interesting and complicated problem based on the C3 3D render and how they have attempted to handle transparency for 3D rendering. It will take some thinking, I don't think it is possible to fix in the shader itself, but there might be a workaround.

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

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 far background 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 background is rendered later it does not write over the pixels. Whew, hmmm how to fix.


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. I posted this to the C3 forum also, perhaps Scirra devs have an idea about how to handle this.