Anyone have a good technique for doing this?
My first approach was to do reverse rim lighting on a cone with a falloff like this:
// I assume that the local origin of the object is 0, 0, 0float transparency = 1 - saturate(length(In.localPosition) / Falloff);float3 V = normalize(In.eyeVec); float3 Nn = normalize(In.worldNormal); float rim = pow(dot(Nn, V), RimPower) * transparency * RimColor.a * RimIntensity; return float4(RimColor.rgb, rim);
This looks good only when the surface normals are facing the camera...