-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hi, recently i bought HTC Vive Elite hmd, mostly for passthrough features and it turned out a way more complicated than i expected.
I had tried ALXR and it works great, except... it uses 'black' color for passthrough as default, which is killing half of fun of it.
I did some research and found custom [old] builds with 'green' or 'blue' colors instead, but only for Pico and Quest headsets. None of these worked on HTC XR.
Then i bought VD, since it's 'super easy' and everyone reccomend it. Yeah, it doesn't support passthrough for Vive headsets at all.
So, is it possible to request here 'an custom' build with green color passthrough? I tested a few latest nightly builds and 'android' versions [non quest or pico specific] works just fine.
I know there is a way to compile it myself, but i never had any interest in any android apps at all, so it would take days for me to even install all the correct prerequisites. So i thought maybe someone, or korejan himself, could help here.
I found this code for custom color people were using in theirs quest\pico custom builds:
alvr/openxr-client/alxr-engine-sys/cpp/ALVR-OpenXR-Engine/src/alxr_engine/vulkan_shaders/passthroughMask_frag.glsl.
#version 460
#ifdef ENABLE_ARB_INCLUDE_EXT
#extension GL_ARB_shading_language_include : require
#else
// required by glslangValidator
#extension GL_GOOGLE_include_directive : require
#endif
#pragma fragment
#include "common/baseVideoFrag.glsl"
#include "common/color-functions.glsl" //added from Rachmanin0xF github
vec3 RGB_TO_LAB(vec3 rgb) {
return XYZ_TO_LAB(RGB_TO_XYZ(rgb));
}
float when_lt(float x, float y) {
return max(sign(y - x), 0.0);
}
layout(location = 0) out vec4 FragColor;
const vec3 KeyColor_LAB = vec3(21.0486,-5.2067,21.8668); //Modify as you wish in LAB format this code is between brown/green/yellow
void main()
{
vec4 sampleRGB = SampleVideoTexture();
vec3 sampleLAB = RGB_TO_LAB(sampleRGB.rgb);
float deltaE = LAB_DELTA_E_CIE2000(sampleLAB, KeyColor_LAB);
sampleRGB.a -= when_lt(deltaE, 10.0); //tolerance, try 10 for instance
FragColor = sampleRGB;
}