Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vulkan Mobile: Decal Rendering Issues, Doubling Up? #81143

Closed
SeanH-CB opened this issue Aug 29, 2023 · 6 comments · Fixed by #83493
Closed

Vulkan Mobile: Decal Rendering Issues, Doubling Up? #81143

SeanH-CB opened this issue Aug 29, 2023 · 6 comments · Fixed by #83493

Comments

@SeanH-CB
Copy link

SeanH-CB commented Aug 29, 2023

Godot version

4.1.1.stable

System information

Windows 11 - Vulkan (Mobile) - NVidia GTX 1070 537.13

Issue description

When placing more decals equal to or around the max of 8 decals for a surface, issues begin to occur.
Setting a decal to be slightly transparent, depending on the viewing angle decals are rendered twice which means they are no longer blended with the surface correctly.

Also when moving the camera around, sometimes a decal will also move around along the surface.
This issues occurs on both StandardMaterial3D & ShaderMaterial.

Screenshot:
image

Decal.Issue.Example.Compressed.mp4

Steps to reproduce

  • Make a New 3D Project
  • Set rendering Mode to Mobile
  • Add a MeshInstance3D
  • Place around 8 decals on the surface
  • Move the camera around until you see issues described/shown in video

Minimal reproduction project

Mobile Decal Issues.zip

@Calinou
Copy link
Member

Calinou commented Aug 29, 2023

cc @BastiaanOlij

#80911 may have surfaced a bug that previously wasn't noticeable.

Place around 8 decals on the surface

Does this occur with only 7 decals? Vulkan Mobile is limited to 8 decals per surface, but there may be an issue preventing 8 decals on the same surface from rendering correctly.

@jcarlosrc
Copy link

I have noticed that decals move with the camera without achieving the 8 amount limit.

@HatAndTie
Copy link

It also seems to happen when the decal isn't in the cull-mask of the camera, while the mesh it is projected on is.

@clayjohn
Copy link
Member

I'm looking into this now. The bug is more pervasive than I expected. It impacts lights, decals, and reflection probes and its an issue in both the Mobile and GL Compatibility renderers.

The root of the issue is that we pass IDs for all lights/decals that affect a mesh to the mesh before drawing. But we only update data for lights/decals that will be visible.

@coobenguy
Copy link

Still having this issue in the latest 4.2 beta

@Calinou
Copy link
Member

Calinou commented Nov 15, 2023

@coobenguy Please open a new issue with a minimal reproduction project attached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants