Crazy Neon Shader

So, i do once in a while brainstorm about coding and OSL and i often get this kind of shader as the result!


shader OSLNeon(
color IC = color(1,0,0),
float Fact = 10,
float Power = 2,
float Tick = 0.5,
float Noise = 0,
output closure color CL = holdout()
){
float SA = surfacearea();
float Disp = noise(cos§sin(PP)pow(Noise,2));
closure color EM = emission()SA;
color Res = IC
(length(tan((cos§)/sin(dot(sin(P/Fact)/Fact,cos§
-P*Fact)*20))))0.8/
pow(length(sin(cos(-P/dot(P/SA,-tan§-(sin(cos(SA/N))))0.3P/Fact
u)))Tick+sin(Disp),Power);
CL = diffuse(N)Res+EM(Res
0.4);
return;
}

Have fun!

I Love it !


Here’s another example of what you can get with the volume version of the neon shader!