#Shader Keyword

1 messages · Page 1 of 1 (latest)

vital parrot
#

How to set shader keyword in dots?
similar to

[MaterialProperty("_Opacity")]
public struct MyOwnOpacity: IComponentData
{
    public float Value;
}
#

Shader Keyword

vital parrot
#

Is there any way? even using code?

vernal fog
#

This what you want?

#

Because that looks like your first example

#

Or are you want to specifically set global Shader keywords because you do that he same way as in regular world

vital parrot
#

Yeah, shader keyword

#

It is a local keyword

#

Is it still a MaterialProperty?

#

disabling renderers in front of player (between camera)

#

i have a keyword on my shader to render shadow only

vernal fog
#

Hmm I'm not familiar enough with using keywords vs material properties

#

I'm not aware of a way to set keywords like that though (not to say it's not possible)

#

Might be better asking on forum

vital parrot
#

It looks like i need to change material for the keyword to work

magic imp
#

It's not possible to toggle keywords separately via Entities. Changing the Material is the recommended way.

vital parrot
#

Thank, you. Yeah, it makes sense. But how do i change the material? do you have a link?