ScruffyShaderKeywordsUtility
ScruffyShaderKeywordsUtility copied to clipboard
A Unity3D tool to remove potentially unused shader keywords from VRChat Avatars!
ScruffyShaderKeywordsUtility
A Unity3D tool to remove potentially unused shader keywords from VRChat Avatars!
Download
You can download via the green button near the top right there (Download Zip) or click here!
But why
Unity has a global limit of 256 keywords. A lot (~60) are used internally by Unity.
Any new keyword you encounter goes onto a global list, and will stay until you restart the client.
Keywords are used to create compile time branches and remove code, to optimize a shader, however, because of the 256 keyword limit, using them in VRChat can cause other shaders which use keywords to break, as once you hit the limit, any new keyword will get ignored.
It's best in the confines of VRChat to stray away from using them if possible, as not to cause issues with (your) shaders breaking.
How to use
Go to Tools > Scruffy > Avatar Shader Keywords Utility
Click on the checkboxes to open up a list of the materials that are used by that avatar
Click on the checkboxes next to the materials to show a list of keywords that you can delete
Clicking delete will remove that keyword from the material
Clicking Delete ALL Keywords on this Material
will delete all keywords on that material
By default there is a whitelist of keywords that will not be deleted by this tool and are Unity Standard.
Here is the list of Unity Standard keywords and Post Processing V2.
_ALPHABLEND_ON
_ALPHAMODULATE_ON
_ALPHAPREMULTIPLY_ON
_ALPHATEST_ON
_COLORADDSUBDIFF_ON
_COLORCOLOR_ON
_COLOROVERLAY_ON
_DETAIL_MULX2
_EMISSION
_FADING_ON
_GLOSSYREFLECTIONS_OFF
_GLOSSYREFLECTIONS_OFF
_MAPPING_6_FRAMES_LAYOUT
_METALLICGLOSSMAP
_NORMALMAP
_PARALLAXMAP
_REQUIRE_UV2
_SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
_SPECGLOSSMAP
_SPECULARHIGHLIGHTS_OFF
_SPECULARHIGHLIGHTS_OFF
_SUNDISK_HIGH_QUALITY
_SUNDISK_NONE
_SUNDISK_SIMPLE
_TERRAIN_NORMAL_MAP
BILLBOARD_FACE_CAMERA_POS
EFFECT_BUMP
EFFECT_HUE_VARIATION
ETC1_EXTERNAL_ALPHA
GEOM_TYPE_BRANCH
GEOM_TYPE_BRANCH_DETAIL
GEOM_TYPE_FROND
GEOM_TYPE_LEAF
GEOM_TYPE_MESH
LOD_FADE_CROSSFADE
PIXELSNAP_ON
SOFTPARTICLES_ON
STEREO_INSTANCING_ON
STEREO_MULTIVIEW_ON
UNITY_HDR_ON
UNITY_SINGLE_PASS_STEREO
UNITY_UI_ALPHACLIP
UNITY_UI_CLIP_RECT