Is there a way to define in an hlsl shader to use one of the default unity built-in textures? Because i have a shader and i want it to use the default-particle texture as the mask-texture input by default rather than having to put in the texture yourself. I don’t know if this is even possible, that’s why i’m here to ask lol.
You can’t set defaults to anything in the shader file itself, apart from a set of basic solid colors.
What you can do is set defaults on the shader asset itself by selecting it in the editor’s Project view and assigning a texture to the texture property in the inspector. But be aware this is only something that works in the editor when assigning a shader to a material in the inspector that does not already have a texture assigned to that property. If you create a material from c#, or the texture has already been assigned to something, then it will ignore that default. If a material has already been created and you change the default on the shader asset, it won’t update those materials.