How to render transparent pixels with OSL?

I’m in render mode using open shading language to produce an abstract texture. I’m using a color ramp for the color output. However, the color ramp won’t render transparency. I can render colors, but not transparent colors. Is there a setting in blender that might fix this?

Maybe you have to clearify this… in OSL itself color is just RGB but the Colorramp node in blender also provides alpha… and of course color by itself does not render but you need any shader… especially maybe a transparency shader… ?!

(in OSL: closure color transparent bsdf ( )… )

Hmm, so my problem is I’m controlling the color of the script-generated OSL shader via the color ramp. The color ramp has an alpha option, but OSL doesn’t seem you render transparency at all. You’re saying there’s a separate…uh…plugin, script thingy, oh wait, NODE is the word. There’s a separate Node specifically for transparent pixels I can plug into the color ramp somehow?

As i said… you can compute any color via an OSL script but this is only RGB and continue processing this maybe with an additonal output with any other blender nodes…
…or use the OSL own BSDF (look into the API of OSL) in the first place.

…or even elaborate this at bit more…

Youe reply on my hint…

…let’s me assume maybe you don’t realy know what OSL is an how someone can use it in blender ?? Maybe a pure blender shader nodes setup will solve your problem… ???

And here is a example of aglass shader in OSL (which properly uses soem transparency)

Discussed in this thread: