GarageGames / Torque3D

MIT Licensed Open Source version of Torque 3D from GarageGames
http://torque3d.org
MIT License
3.35k stars 1.2k forks source link

Decals and Decalroads with transparency don't apply normalmaps #1775

Open RichardsGameStudio opened 8 years ago

RichardsGameStudio commented 8 years ago

When using decals and decalroads that have transparency flag set in their materialdefinition don't apply their normalmaps when rendered. Setting or clearingthe Transparent Z-write flag has no influence.

RichardsGameStudio commented 8 years ago

Some images to show the issue.

Original scene: Decalroad, no transparency

Original scene: Normals view

Transparency and Z-Write set, Normals view As you can see, the normals of the decalroad disappear.

Transparency and Z-Write set, standard view Now showing the scene, clearing Z-Write flag seems to solve it as you can see in the next image: Transparency set and Z-Write clear, standard view Unfortunately this is not the case as you can see in the normals view image: Transparency set and Z-Write clear, normals view

Azaezel commented 8 years ago

http://imgur.com/a/lBnit can't rely on the visualizers for translucent evaluations unfortunately. edit: for clarity, this is because translucent objects are forward lit, which go through similar math, but dissimilar buffer handling. the visualizers just display buffers. (or unpacked versions therof in the case of normals)

RichardsGameStudio commented 8 years ago

I see, but I haven't seen this behaviour before updating to 3.9, where the underground of the decal(road) did not show through the decal (so strong?). So as I understand, it is caused by this separation. Is there a way to get the same results as it was before (and not by switching back to my old version)? Just because it is a strange sight to see the grass normals on a gravel path, where you can expect (quit logical) gravel normals.