Page MenuHome

Blender 2.83 OSL microfacet closure not recognized
Closed, ResolvedPublic

Description

System Information
Operating system:
Windows 10 64bit
Graphics card:
Nvidia Gtx1070

Blender Version
Broken: 2.83
Worked: 2.82

Short description of error
OSL microfacet closure not recognized.
The shaders compile withour error,
But when rendering the microfacet closure returns 0,
And an error is reported in the system console:
Closure ‘microfacet’ is not supported by the current renderer

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).
This OSL code renders black and outputs the error:

surface testGGX
(
	color refColor = color(1.0,0.5,0.0),
	output closure color bsdf = 0
)
{
	bsdf = microfacet ("ggx", N, (0,0,1), 0.1, 0.1, 0, 0) * refColor;
}

Note:
I did a comparison of the OSL stdosl.h and oslutil.h source files with the ones in 2.82 and there are many differences.
Copying these 2 files from Blender 2.82 to 2.83 seem to fix the problem.
It also should be noted that .oso files compiled using previous versions do render properly.
Only .oso files compiled with 2.83 have the problem.

Thanks!
Oded