Skip to content

Shader property default values #48

Description

@japsuu

Is your feature request related to a problem? Please describe.
Not a problem per se, but you need to manually assign the default properties of a material after creating the material instance. This is clunky and unnecessary.
For example, if the shader used by a material requires a texture, you might want to set it to a magenta texture by default.

Describe the solution you'd like
I'd like to be able to define property defaults directly in the KSL (Korpi Shader Language) code:

Shader "..."

Properties
{
	_Texture0("main texture", TEXTURE_2D) = "white"
}

Pass 0
{
	...
}

Describe alternatives you've considered
None

Additional context
This feature would work similar to Unity's ShaderLab defaults:

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions