Skip to main content
LeftRight92's user avatar
LeftRight92's user avatar
LeftRight92's user avatar
LeftRight92
  • Member for 8 years, 3 months
  • Last seen more than 7 years ago
awarded
awarded
accepted
answered
Loading…
revised
Problems with BlendOp Max
added 169 characters in body
Loading…
revised
Problems with BlendOp Max
added 485 characters in body
Loading…
awarded
comment
Problems with BlendOp Max
Added shader code. The 'shapes' is the lighting from two point lights. The colours are part of one of the textures on the object (the _LitTex in the shader, the _UnlitTex is just black)
revised
Problems with BlendOp Max
Added shader code
Loading…
comment
Problems with BlendOp Max
It's in unity, so the plane asset. Shader is written as a vert-frag shader in ShaderLab/CG. Note that the 'line of doom', as I've called it, moves in some way that's dependant on the camera and doesn't lie along an edge boundary or similar..
asked
Loading…
awarded
comment
How do I get a Light's Range value in Shader?
Thanks for the suggestions, once I've got enough rep, I'll come back and +1 this, because you deserve it.
awarded
accepted
answered
Loading…
awarded
revised
How do I get a Light's Range value in Shader?
added 1654 characters in body
Loading…
comment
How do I get a Light's Range value in Shader?
Well, frag, vert, whatever, you get the rough idea I hope
comment
How do I get a Light's Range value in Shader?
Sorry, accidentally commented before I was finished. Shader only needs support for point lights, I can do that easily enough. Basically, if we were to write some vague pseudocode: foreach(vertex in mesh) { if(vertex's distance to light < light's range) { return appropriate mapped colour from the lit texture; } else { return appropriate mapped colour from the unlit texture; }} is how I've worked it out.