Line Renderer shader that's effected by light and fog?

Can anyone recommend a shader to be used in a Line Renderer that will be effected by both fog and light? I think I’ve tried all the standard particle shaders but none seemed to work the way I want them to. Suggestions?

1 Like

Doesn’t the rendered line always face the camera anyway? Perhaps you could explain how you need the line to be affected by the light.

I’m using a line renderer as an object in my game and I want it to be effected by changes in lighting in the scene. My scene has two lights: a point light and ambient light that both change during the game (imagine day and night cycles). So basically I want the line renderer to behave like a diffuse shader on a mesh object.

The problem that I ran into using a diffuse shader is that the line renderer is only effected by the ambient light, not the point light. So in the night scene, the line renderer was black and unlit by the point light.

I tried using a vertex lit shader which delivered the desired effects on my Mac, but it didn’t work under Windows (due to a difference in how D3D handles this).

None of the particle shaders that I tried worked and so I’m stumped on what to try next. Any suggestions?

1 Like