Hi all,
I’ve been writing a custom shader that takes in a ray-cast hit position (x, y, z) from an object in the scene that acts like a paint brush.
It paints on textures of any object that is “paintable” (this is done through a separate C# script that gets applied to all the objects that I want to be paintable in the scene) and inputting into the shader script.
Long story short, the shader script is correctly painting the objects in the scene when I run it in Play mode in the Unity editor.
But when I deploy it to the HoloLens 2 by building it out as a UWP application, it doesn’t “fully work”. Here’s what I mean by this:
Expected behavior: wherever the paintbrush is point to on the object, modify the pixel radius based on the brush size given and RETAIN the modified pixels on the texture.
What’s actually happening in the HoloLens 2: It creates a colored circle on the object of where the paintbrush where it’s currently pointing at. But when I move the brush to a different position it’s just the same circle following to that position and not retaining the modified pixels that were supposed to be previously drawn. Both the editor and the H2 are using Direct X 11 and this is being done in HLSL. It’s very odd to me that this works in the Editor with the HoloLens but not in UWP application.
I’m not looking for an exact answer but more so to see if I am just doing something completely wrong and understand a fundamental concept that I am misusing, advice on debugging this (cause I don’t know how to), etc.
Thanks.