/// <summary> /// renders a procedural quad /// TODO fit the bounds of the SDF Volume /// </summary> private void OnRenderObject() { if (!IsPreviewing) { return; } //try to get active camera... Camera cam = Camera.main; if (UnityEditor.SceneView.lastActiveSceneView != null) { cam = UnityEditor.SceneView.lastActiveSceneView.camera; } SDFPreview preview = _aPreview as SDFPreview; preview?.Draw(cam, sdfFlip, previewEpsilon, previewNormalDelta); }
/// <summary> /// renders a procedural quad /// TODO fit the bounds of the SDF Volume /// </summary> private void OnRenderObject() { if (!IsPreviewing) { return; } //try to get active camera... Camera cam = Camera.main; // lastActiveSceneView if (SceneView.currentDrawingSceneView != null) { cam = SceneView.currentDrawingSceneView.camera; } SDFPreview preview = _aPreview as SDFPreview; preview?.Draw(cam, sdfFlip, previewEpsilon, previewNormalDelta, useRayDirVertShader); }