SixWays / UnityShaderStripper

Modular utilities for shader stripping to drastically improve Unity build times
MIT License
350 stars 42 forks source link

need shader variant asset be bundled with shaders #5

Open lwangwangl opened 4 years ago

lwangwangl commented 4 years ago

i use these scripts to build assetbundle for shaders, and found out that the shaders are where stipped,but if the shader variant asset is not in the same bundle with shaders, the shader load when running is not correct ,why?

SixWays commented 4 years ago

I'm not sure I understand the question, sorry! Could you rephrase? Also I've not much experience with asset bundles so I may not be able to answer anyway...

HorunS commented 3 years ago

I've gotten the same problem. Case:

  1. We have 100 SVC for 1 shader. We want to build 1 svc per asset bundle(so, we have built 101 asset bundle)
  2. Supposed result: shader bundle has all non stripped shader variants.
  3. Actual result: shader bundle is stripped completely, even though we have a lot of dependent svc in other bundles.

Looks like it's rather Unity's issue, than your great tool.