How to Create Outline Glow Effect like in Planet Earth Workbook on Hololens?

dmurphydmurphy CAMember

I'm trying to get the outline glow that's on the satellites in Planet Earth workbook https://github.com/xamarin/Workbooks/tree/master/graphics/urhosharp/planetearth working in the Hololens, but I keep getting a System.Exception from Urho.dll. I've started from the SharpReality template in Visual Studio and then added all the assets in the same directories as in the Planet Earth workbook. There are two changes I've made for the Hololens. First is the Hololens uses DirectX, so I ported the Outline.glsl file to Outline.hlsl here: https://pastebin.com/QKe7U52g. Second, the Hololens uses two viewports, so I've added:
var effectRenderPath1 = Renderer.GetViewport(0).RenderPath.Clone(); var effectRenderPath2 = Renderer.GetViewport(1).RenderPath.Clone(); effectRenderPath1.Append(ResourceCache.GetXmlFile("RenderPaths/Outline.xml")); effectRenderPath2.Append(ResourceCache.GetXmlFile("RenderPaths/Outline.xml")); Renderer.GetViewport(0).RenderPath = effectRenderPath1; Renderer.GetViewport(1).RenderPath = effectRenderPath2;

I'm using UrhoSharp.SharpReality 1.4.47

Has anyone else managed to get this effect or a similar one working on the Hololens and know what I'm doing wrong here? Or had any luck modifying the RenderPaths on the viewports?

Thanks.

Best Answer

Answers

Sign In or Register to comment.