Skip to content

Added support for ViewportTexture to Decals and projectors and update…#1

Draft
TheMagnat wants to merge 1 commit into
ColinSORourke:DecalDrawSyncfrom
TheMagnat:DecalViewportSync
Draft

Added support for ViewportTexture to Decals and projectors and update…#1
TheMagnat wants to merge 1 commit into
ColinSORourke:DecalDrawSyncfrom
TheMagnat:DecalViewportSync

Conversation

@TheMagnat
Copy link
Copy Markdown

@TheMagnat TheMagnat commented Apr 19, 2026

Based on the comment of godotengine#115653 (comment), I gave a try on adding ViewportTexture redraw support on decal atlas. This is a draft, I think my approach on resolving the proxy texture awkward and I would love to get some help and feedback on what I've done so far. I'm not sure if I'm doing correctly the "used" update.

A big issue from my implementation is that the Viewport texture get duplicated everytime a new ViewportTexture is added to it :
image

Done in this PR :

  • Resolve Proxy textures in the update_decal_atlas method and decal_atlas_redraw_textures methods
  • decal_atlas_mark_draw_on_texture is now in the base class RendererTextureStorage
  • Removed ViewportTexture restriction in Decals and Light Projectors

I also think maybe this should be done in a separate PR on the Godot repository, since your original PR already work well.

demoViewport.mp4

… the texture in the DecalAtlas

- Resolve Proxy textures in the update_decal_atlas method and decal_atlas_redraw_textures methods
- decal_atlas_mark_draw_on_texture is now in the base class RendererTextureStorage
- Removed ViewportTexture restriction in Decals and Light Projectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant