Forum Discussion
JoshuaVe
3 years agoProtege
OVROverlay, underlays and Universal Render Pipeline (URP) doesn't work?
Has anyone gotten that combination of things to work? Overlay works just fine with URP, so I'm assuming it's my attempts to punch out a hole that are failing. I'm assuming Oculus' shader doesn't wo...
- 3 years ago
Okay, got it working, was a foreheadslapper where I'd forgotten I'd turned off a certain Layer on my camera -- the exact layer I was rendering my punchout quad on... eyeroll.
My final URP punchout shader is fairly simple, I can share if anyone is curious.
JoshuaVe
3 years agoProtege
Okay, got it working, was a foreheadslapper where I'd forgotten I'd turned off a certain Layer on my camera -- the exact layer I was rendering my punchout quad on... eyeroll.
My final URP punchout shader is fairly simple, I can share if anyone is curious.
lohini.messa
3 years agoHonored Guest
Hello, Can you share your punchout shader?
I was trying to use Oculus SDk's Underlay Impostor shader but it doesn't work with URP.
Thank you.
- JoshuaVe3 years agoProtege
Properties { _MainTex ("Albedo", 2D) = "white" {} } SubShader { Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "RenderPipeline" = "UniversalPipeline" } Blend DstColor Zero Lighting Off ZWrite On ZTest LEqual Pass { Name "Forward" Tags { "LightMode" = "UniversalForward" } HLSLPROGRAM #pragma vertex vert #pragma fragment frag #include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/Core.hlsl" sampler2D _MainTex; CBUFFER_START(UnityPerMaterial) float4 _MainTex_ST; CBUFFER_END struct vertexIn { float4 vertex : POSITION; float2 texCoord : TEXCOORD0; UNITY_VERTEX_INPUT_INSTANCE_ID }; struct vertexOut { float4 vertex : SV_POSITION; float2 texCoord : TEXCOORD0; UNITY_VERTEX_OUTPUT_STEREO }; vertexOut vert(vertexIn v) { vertexOut output; UNITY_SETUP_INSTANCE_ID(v); UNITY_INITIALIZE_VERTEX_OUTPUT_STEREO(output); VertexPositionInputs vertexInputs = GetVertexPositionInputs(v.vertex.xyz); output.vertex = vertexInputs.positionCS; output.texCoord = TRANSFORM_TEX(v.texCoord, _MainTex); return output; } half4 frag(vertexOut input) : SV_Target { half4 outColor = tex2D(_MainTex, input.texCoord); clip( outColor.a < 0.1f ? -1:1 ); return half4(outColor.xyz, 0); } ENDHLSL } }
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 31 days ago
- 8 years ago
- 7 years ago