godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.59k stars 21.28k forks source link

Allow decals to override Sub-Surface Scattering #73912

Open KylerBessert opened 1 year ago

KylerBessert commented 1 year ago

Godot version

4.0 RC5

System information

Windows 11, Vulkan

Issue description

If you use a decal texture on a mesh that has subsurface scattering on the material the decal has undesired results, and gains the subsurface scattering on the decal.

Images with and without subsurface scattering; image image

Steps to reproduce

  1. Create a new scene
  2. Create a mesh instance and assign any mesh
  3. Create a new material on the mesh and make sure it uses subsurface scattering, with a strength of 1, and skin mode toggled on.
  4. Apply a decal onto the surface of the mesh from another node.

Minimal reproduction project

N/A

clayjohn commented 1 year ago

This is the expected behaviour. Decals only modify a surface's albedo, roughness, metallic, and normal. They do not affect the other properties of the material.

Do you have a use case where you need to have a decal that also overrides the SSS property?

KylerBessert commented 1 year ago

Yes, I am using a decal as the eyes on a character, also blood decal on an arm, but the SSS makes both of these look pretty bad. If I do not use SSS the decals look great, but again the character now looks bad without the SSS.