KhronosGroup / KhronosGroup/UnityGLTF

PBRGraph shader size in memory is too much - 433.2 MBs

Open
#792 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2.2k
Forks
536
PR merge metrics
No merged PRs in 30d

Description

Hi!

I was wondering why this PBRGraph shader has this much size in memory even though if I've no GLBs in the scene. I can surely place any GLB at runtime but currently at the time of this memory capture there was no GLB present in the scene.

![image](https://github.com/user-attachments/assets/3a35cdd8-6df4-43f5-bf60-1bf3f47e8f99)

I've included both UnityGLTF shaders in my project Graphics settings because we don't have any GLB in the scene but we can place any type of GLB at runtime.

![image](https://github.com/user-attachments/assets/a43cb354-d559-45b4-b9a4-38bed0590c79)

We don't support draco, GPU instancing or these things so I was wondering if there is any way that I could remove some parts from this shader referring to these things and my apps memory will be saved in some way?

Any suggestion would be appreciated, Thankyou
cc. @pfcDorn @hybridherbst

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported 433.2 MB PBRGraph shader memory usage in Unity with the UnityGLTF shaders included in Graphics settings and no GLB in the scene. Inspect the memory capture and shader configuration to determine whether Draco, GPU instancing, or other unused features contribute to the size. Done means identifying a supported way to reduce the shader memory or documenting why it cannot be reduced.

Written by the indexing model from the issue text.

Assessment

Tech stack
unity
Domain
game-dev, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.