Adding a world-space decal causes transparent objects to not draw (ES2)

I’m building an Android project, using the plain ES2 target.

I also test gameplay in SM5 on Windows.

When I add a decal that works fine in SM5, the decal doesn’t show up in ES2, AND the transparent game objects I’m drawing no longer draw after this. This happens both on the desktop machine in ES2 preview (using a NVIDIA GTX 980 on Windows 10) as well as on a device (OnePlus One, Android 5.1, Snapdragon 801 / 330 GPU)

Either, this is a bug in the forward renderer state management, or I’m doing something wrong.
if I’m doing something wrong, what should I do to properly add a decal to a world object?

Here’s how I add the decal to the world:

Here’s the decal material (note there’s also a “deferred decal” mode, no “forward renderer decal” – does this matter?)

Here’s how I get the location to spawn:

I was thinking perhaps the “location to spawn” is right in front of the camera or something, but I don’t think so, as it works fine in SM5, and not when I switch to ES2 render mode, and change nothing else.

Hi jwatte -

Does your setup work when you switch to the Mobile Preview in the Editor itself?

Thank You

Eric Ketchum

This happens both on the desktop
machine in ES2 preview (using a NVIDIA
GTX 980 on Windows 10) as well as on a
device (OnePlus One, Android 5.1,
Snapdragon 801 / 330 GPU)

Ok, can you let me know what type of Translucency you are using, what does the Material Attributes say? Is it Volumetric Non-Directional, Volumetric-Directional, Surface, Surface Per-Pixel?

I’ve been trying to replicate the issue and am not seeing a problem when I render it out beyond the fact that Deferred Decals will never render on top of Translucent Objects.

Eric Ketchum

Here’s a project re-created from scratch in erlease 4.10.0.
Run it, Click on the floor to add a decal.
The transparent bubble stops drawing when the decal is added to the floor, only in ES2/Android preview mode, but not in SM4/SM5 modes.
link text

Hi jwatte -

In your DefauleEngine.ini you have MobileHDR set to False, in order to render the Decals and Translucency correctly on ES2 Mobile you will need to have MobileHDR set to true. You can do this from Project Settings >> Rendering. You will need to restart the project to have this setting take effect.

68918-test.jpg

Thank You

Eric Ketchum

I’d like to target the largest possible set of devices. The Performance Guidelines page does not mention transparency or decals as being limited when using LDR or Basic Lighting modes:

Thus, I really do think this is a bug! Neither decals nor alpha blended primitives should have anything to do with the lighting mode (especially in a forward renderer.)

I discussed this with one of our engineers and while we do agree that it is a bug, it appears to have been corrected in our internal branch, so a fix for this should be coming with the next major engine release.

Eric Ketchum

Oh, sweet! I look forward to that. Thanks for following through.