#ColorGradient with Texture

1 messages · Page 1 of 1 (latest)

fallen pawn
#

property:

    Properties
    {
        _MainTex ("ColorTransistion", 2D) = "white" {}
        _vertColor("Color", Color) =(1,0,0,0)

    }
#

inside my v2f:

o.color = tex2Dlod(_MainTex, float4(1024*colorFactor,0,0,0));
#

the color turn out to whatever stands in the quotes

#

but i can't find how to refer to the texture that i added onto the material

jagged summit
#

the uv coordinate of "1024*colorFactor" does not make any sense to me. I do not know what colorFactor is supposed to be and why you multiply it by 1024?