hi i have an object that on selection has an marker projected on the ground with a projector.
now is this marker a bit dark and i would like to brighten up this marker by making it emit light. only the standard shader for the projection are insufficient.
can someone help me to make the shader emit light, or is it just impossible with a projector.
There is no such thing as “light” in the innards of your 3D app’s code. “Light” generally refers to RGB values that get multiplied into your main texture. Spotlights and projectors are essentially the same thing; the difference is, you deal with spotlights in the shaders that are used by individual objects’ materials, and projectors blend the same material onto every object with which they interact. As such, spotlights offer more flexibility at the expense of complexity. You need to delve a little deeper into what is going on in your renders, and then decide what is appropriate.
Shader "Projector/Light" {
Properties {
_Color ("Main Color", Color) = (1,1,1,1)
_ShadowTex ("Cookie", 2D) = "" { TexGen ObjectLinear }
_FalloffTex ("FallOff", 2D) = "" { TexGen ObjectLinear }
}
Subshader {
Pass {
ZWrite off
Fog { Color (0, 0, 0) }
Color [_Color]
ColorMask RGB
Blend DstColor One
Offset -1, -1
SetTexture [_ShadowTex] {
combine texture + primary , ONE - texture //used to be multiply now is add
Matrix [_Projector]
}
SetTexture [_FalloffTex] {
constantColor (0,0,0,0)
combine previous lerp (texture) constant
Matrix [_Projector] //used to be _projectorClip
}
}
}
}
this is the projector light shader but modified
and the textures that was on the _fallofftex i changed it to my main texture, that has an alpha channel
and the matrix of the falloftex has been changed to the same matrix as the _shadowtex