unity3d - Trail renderer always black? -
the answer easy. use mobile/diffuse shader not accept main color multiply texture. need shader has main color. can use (it varation of mobile/diffuse main color)
shader "mobile/diffuse color" { properties { // adds color field can modify _color ("main color", color) = (1, 1, 1, 1) _maintex ("base (rgb)", 2d) = "white" {} } subshader { tags { "rendertype"="opaque" } lod 100 pass { lighting off settexture [_maintex] { // sets our color 'constant' variable constantcolor [_color] // multiplies color (in constant) texture combine constant * texture } } } fallback "mobile/vertexlit" }
also should use texture, can 2x2 resolution white pixels. color textures same color choosen in trail renderer.
Comments
Post a Comment