# Cycles and OSL Render - Weird Seam

I'm trying to make a rock stick out of the sea, and want to blend from a wet rock to dry rock using cycles nodes.

I use a mix shader to blend between two shaders based on the Z position. The mix factor is obtained by calling smoothstep in an OSL script.

My node setup is like so:

However, for some reason I'm getting a sharp seam along Z positions where the blending ends:

Anyone know what might cause this, or how to fix it?

Thanks!

• I was not able to reproduce your issue. I don't think the problem is caused by the OSL script. Texture? Could you upload your blendfile for deeper inpection? – Carlo Sep 4 '15 at 23:24
• Just uploaded it. :) – user673679 Sep 4 '15 at 23:25