MATCAP rendering fails in RhinoWIP

Hi @nathanletwory,
I guess the problem is the DisplayMaterial.SetEnvironmentTexture doesn’t work as expected.

private void RunScript(Mesh x, ref object A)
{
   _m = x;
}
// <Custom additional code> 
Mesh _m;
public override void DrawViewportMeshes(IGH_PreviewArgs args)
{
   var mat = new DisplayMaterial();
   mat.SetEnvironmentTexture(@"D:\matcap.png", true);
   args.Display.DrawMeshShaded(_m, mat);
}
// <Custom additional code>


other textures work as expected:

SetEnvironmentTexture.gh (2.4 KB)

1 Like