Hi there,
I found this shader on the forums, it works well, but I need one that does the inverse:
The ‘non-lit’ areas need to be opaque and the lit areas completely transparent.
I’m really struggling with shaders. Could someone help me understand how to adapt it?
Shader "Lighting Only"
{
Properties
{
_Color ("Main Color", Color) = (1,1,1,1)
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader
{
Blend SrcAlpha One
ZWrite Off
Tags {Queue = Transparent}
ColorMask RGB
// Vertex lights
Pass
{
Tags {"LightMode" = "Vertex"}
Lighting On
Material
{
Diffuse [_Color]
}
SetTexture [_MainTex]
{
constantColor [_Color]
Combine texture * primary DOUBLE, texture * constant
}
}
}
Fallback "VertexLit", 2
}
Edit
Image for ScroodgeM:
Hey, this is what I get Light is from left to right.
There’s another sphere inside, you can see it with the gizmo’s on… but it doesn’t appear visible through the outer sphere.
I’m not sure why this is…