[2.1] Use only diffuse colour with unlit hlms
Posted: Tue Mar 16, 2021 7:23 pm
Hello,
is there a way to only use the diffuse colour for materials made with the default unlit hlms (while completely ignoring the vertex colour)?
When you set a diffuse colour, either by passing in the param "diffuse x y z" when creating the datablock or using SetUseColour and SetColour on the datablock, the template always uses this line from the unlit pixel shader:
@property( hlms_colour && !diffuse_map ) outPs.colour0 = inPs.colour @insertpiece( MultiplyDiffuseConst );@end
So the pixel colour gets mixed with the diffuse colour.
There is this line which looks like it does what I want:
@property( !hlms_colour && diffuse ) outPs.colour0 = material.diffuse;@end
But I don't know what functions to call to have the properties set correctly. hlms_colour seems to be set automatically when adding diffuse colour so this
line is never generated.
is there a way to only use the diffuse colour for materials made with the default unlit hlms (while completely ignoring the vertex colour)?
When you set a diffuse colour, either by passing in the param "diffuse x y z" when creating the datablock or using SetUseColour and SetColour on the datablock, the template always uses this line from the unlit pixel shader:
@property( hlms_colour && !diffuse_map ) outPs.colour0 = inPs.colour @insertpiece( MultiplyDiffuseConst );@end
So the pixel colour gets mixed with the diffuse colour.
There is this line which looks like it does what I want:
@property( !hlms_colour && diffuse ) outPs.colour0 = material.diffuse;@end
But I don't know what functions to call to have the properties set correctly. hlms_colour seems to be set automatically when adding diffuse colour so this
line is never generated.