Transparent brushes aren't visible in passthrough mode on latest beta

15 Replies
andybak
andybakOP7mo ago
@mikesky no great surprise but this is the offending commit: https://github.com/icosa-foundation/open-brush/pull/613/files#diff-4fa1d1641eac596f779411a63873fc5699b497b587a5f4414d66c279b97b6cbb every change looks pretty harmless apart from maybe this:
#if PASSTHROUGH_SUPPORTED
OVRManager.eyeFovPremultipliedAlphaModeEnabled = false;
#endif
#if PASSTHROUGH_SUPPORTED
OVRManager.eyeFovPremultipliedAlphaModeEnabled = false;
#endif
would you agree?
mikesky
mikesky7mo ago
Holy shit you’ve cracked it This is why oculus Passthrough “works” when all the others don’t quite
andybak
andybakOP7mo ago
well. aside from all transparent brushes being invisible!
mikesky
mikesky7mo ago
Yes, that’s what happens in zapbox and pico! If we could find a way to do premult on other platforms it would be”fix” passthrough there
andybak
andybakOP7mo ago
oh ffs. squash commits are again destroying my ability to do forensics and retrace my steps. remind me why deleting history is a good thing, again?
mikesky
mikesky7mo ago
Clean graph in Fork 😉
andybak
andybakOP7mo ago
yeah. that seems like weak sauce to me
mikesky
mikesky7mo ago
There was other reasons, but I’ve forgotten them. @mikeage?
andybak
andybakOP7mo ago
Can we at least not delete PR branches when we merge? Maybe move them to an attic/ prefix "folder" I'm still a bit confused. Should eyeFovPremultipliedAlphaModeEnabled be true or false?
mikesky
mikesky7mo ago
it should be true (which i'm guessing is the default, or do we set it elsewhere?), at least that's the quick way to get passthrough to work. I'm not sure if that's also asetting that we could find for openxr, zapbox, and pico, that would also achieve the same effect and get it working there too it's either that, or work out what else in our rendering isn't working. OR, now that we know that's how oculus 'fixes' it, work out what that's doing and emulate it elsewhere
andybak
andybakOP7mo ago
yay. luckily on my mac, i don't do git fetch --prune so I've still got the passthrough branch to see when i added that line But it surely shouldn't rely on me forgetting to do that to be able to check back to see a specific commit message So - I added eyeFovPremultipliedAlphaModeEnabled when I did my first initial work on the passthrough brush - so I most likely found it in Meta tutorial on passthrough - that's what I think I was following initially. Let me see if I can find it.
mikeage
mikeage7mo ago
You should also be able to undelete, I believe, but I don't recall how offhand and I'm on my mobile
mikesky
mikesky7mo ago
/// <summary>
/// If premultipled alpha blending is used for the eye fov layer.
/// Useful for changing how the eye fov layer blends with underlays.
/// </summary>
[HideInInspector]
public static bool eyeFovPremultipliedAlphaModeEnabled
{
get { return OVRPlugin.eyeFovPremultipliedAlphaModeEnabled; }
set { OVRPlugin.eyeFovPremultipliedAlphaModeEnabled = value; }
}
/// <summary>
/// If premultipled alpha blending is used for the eye fov layer.
/// Useful for changing how the eye fov layer blends with underlays.
/// </summary>
[HideInInspector]
public static bool eyeFovPremultipliedAlphaModeEnabled
{
get { return OVRPlugin.eyeFovPremultipliedAlphaModeEnabled; }
set { OVRPlugin.eyeFovPremultipliedAlphaModeEnabled = value; }
}
it then disappears into OVRPlugin with no more info 😅 https://microsoft.github.io/Win2D/WinUI3/html/PremultipliedAlpha.htm for later
andybak
andybakOP7mo ago
@mikesky Removing
#if PASSTHROUGH_SUPPORTED
OVRManager.eyeFovPremultipliedAlphaModeEnabled = false;
#endif
#if PASSTHROUGH_SUPPORTED
OVRManager.eyeFovPremultipliedAlphaModeEnabled = false;
#endif
seems to fix the transparent brushes and the passthrough brush still works. Still can't figure out where i got the idea that line was needed.
mikesky
mikesky7mo ago
Great to know! I see a few oculus samples turn it off, for whatever reason I’m looking to see if we can do this in a post process shader instead, then we could have it on all platforms It should be a really simple shader
Want results from more Discord servers?
Add your server