AmplifyCreations / AmplifyShaderEditor-Feedback

4 stars 0 forks source link

Fix duplicated properties when using Shader LODs #141

Open diogovtx opened 2 years ago

diogovtx commented 2 years ago

Related to https://github.com/AmplifyCreations/AmplifyShaderEditor-Feedback/issues/98

Hello. I have a problem with properties block when i'm using shader LODs. If i have multiple Shader LODs (for example, 500 and 400) and connect my nodes to the outputs of all LODs then properties in shader duplicates in random order, and this "random" depends on the order of properties in "Material Properties" section - when i'm randomly switching properties order, then some properties begin to being duplicated and other properties stops being duplicated. How i can fix it? I'm using Unity 2021.3 LTS, URP, ASE 1.9.0.2

@Reedmand on Discord (https://discordapp.com/channels/461534117297913866/1037503203215949934/1037504269609336975)

image

image

image

image

Artie-Reedmand commented 1 year ago

It is also problem with CBUFFER. Right now when you create shader with different lods (subshaders) CBUFFER adjusted independently on each subshader. It leads to 2 problems when you switch active subshader from highest default to another: Different order in CBUFFER parameters leads to bugs in rendering or completely brokes rendering of object with this shader If CBUFFER is somehow different at subshaders (not only order, but parameter's count too), it leads to broken SRP Batching of this shader

As a result, it will be great to have ability to automatically "copy" CBUFFER from highest level subshader to all another. In other words, so that all subshaders have CBUFFER parameters identical to highest subshader

Dawie3565 commented 1 year ago

@diogovtx please bump this to as soon as possible as it's been open too long with bug tag cheers