d4rkc0d3r / d4rkAvatarOptimizer

d4rkpl4y3r's VRChat Avatar 3.0 optimizer
MIT License
350 stars 14 forks source link

Render queue not preserved #36

Open hyblocker opened 1 year ago

hyblocker commented 1 year ago

One of the materials on my avatar's render queue is not preserved when generating the optimised shaders and materials. I have it set to a render queue of 1600, however upon optimising, the optimised variant's render queue option is reset to 2000.

d4rkc0d3r commented 1 year ago

I can't reproduce this issue.

The two places where I do mat.shader = something I have it wrapped with render queue preservation since that assignment resets it to from shader.

d4rkc0d3r commented 1 year ago

Any more info on how this happened? Maybe some special shaders or shader inspectors?

hyblocker commented 12 months ago

I'll have a look and see if I can notice any patterns regarding this.

rskskr commented 11 months ago

I've just come across this issue myself, so I hope I can add a bit more info.

Using Silent's shader, I noticed on a certain opaque material, default render queue, and with the bake button activated (pre-baked?), I would notice the material being semi-transparent in certain conditions. Shown in the image below, and 2nd image is what it should look like instead.

I've noticed the issue fixes itself when I do any of the following, independently of each other:

My optimizer settings for this are only:

The world is "White tile" by amanek: https://vrchat.com/home/world/wrld_1544f2bc-e6db-4810-b450-483376745f7a

VRChat_2023-08-20_23-16-57 435_3840x2160 VRChat_2023-08-20_23-12-53 188_3840x2160

rskskr commented 11 months ago

I've included the broken shader of the post above.

shaders.zip