Search Issue Tracker

Won't Fix



Found in




Issue ID




[Quest 2] Surface shader and multi-view sampling custom textures broken in Quest 2



Steps to reproduce:
1. Open the attached user's project ""
2. Open the scene "LiquidVolumePro/Demos/Beer" and build on a Quest 2 with Multi-View enabled in OculusXR settings
3. Observe the GameObject not being rendered

Expected results: Surface shader and multi-view sampling custom textures render in Quest 2
Actual results: Surface shader and multi-view sampling custom textures do not render in Quest 2

Reproducible on: 2021.3.16f1, 2022.2.4f1, 2023.1.0b1
Could not test on 2020.3.44f1 due to project errors when downgrading

Reproducible on these devices:
VLNQA00415 - Oculus Quest 2 (Quest 2), CPU: Snapdragon XR2, GPU: Adreno 650, OS: 10

-Issue reproduces with Vulkan and OpenGLES 3
-Issue does not reproduce with MultiPass
-Issue reproduces with OpenXR and OculusXR
-According to the user, the allegedly broken code is in:

C#: LiquidVolume.cs, look for ##region Backbuffer
This code setups a command buffer bound to the camera to capture the depth of the geometry in a render texture.

Shader: LVLiquidPassBase.cginc, look for "// sampling depth from the texture".
This code samples the depth value from the _VLBackBufferTexture (the render texture).
For some reason, either capturing the depth in the command buffer or sampling it from this surface shader is not working with multi-view (VR macros are correctly placed).

  1. Resolution Note:

    Looking at the shader and it has macros missing.

    struct Input {
    float3 realPos;
    float4 vertex;
    float4 screenPos;
    float3 camPos;
    This is missing

    in the struct.
    Now the vertex shader looks like this:

    void vert(inout appdata_base v, out Input o) {
    o.vertex = v.vertex;
    o.vertex.w = dot(o.vertex.xz, + _TurbulenceSpeed;
    o.vertex.xz *= 0.1.xx * _Turbulence.xx; // extracted from frag
    o.vertex.xz += _Time.xx; *= _FlaskThickness;
    o.realPos = mul(unity_ObjectToWorld, float4(, 1.0)).xyz;
    o.realPos = mul((float3x3)_Rot, o.realPos - _Center) + _Center;
    o.camPos = mul((float3x3)_Rot, _WorldSpaceCameraPos - _Center) + _Center;
    o.camPos = _WorldSpaceCameraPos;
    UNITY_INITIALIZE_OUTPUT will just initialize the variable type. It is missing

    Now in the surface shader it's missing this line:

    This is what I noticed quickly looking over this shader. I just followed this doc:

    Looking at other code the buffers need to be be arrays and then all the SPI macros need to be in the shaders to interact with the arrays.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.