Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make Obi Fluid work in Oculus Quest 2
#6
(28-04-2021, 01:49 PM)alpaib Wrote: Thank you very much for those links, I am reading the documentation (I didn't find it before sorry Rodar ojos ). Just one thing, I am having a problem with a shader (ScreenSpaceCurvatureFlow). It says "Shader error in 'Hidden/ScreenSpaceCurvatureFlow': undeclared identifier 'sampler_MainTex' at line 57 (on gles3)". Any idea?

Hi,

I'm unable to reproduce this.

"sampler_MainTex" is DX11-style sampler syntax (https://docs.unity3d.com/Manual/SL-SamplerStates.html), not available in OpenGLE3 afaik.

However that particular shader does not contain "sampler_MainTex" at all, it uses the traditional syntax "tex2D(_MainTex)" so there should be no problem. Maybe Unity is internally converting it to DX11 syntax? I'll ask on the Unity forums, as this looks like a bug.

Edit: can you try changing the declaration in Assets/Obi/Resources/ObiMaterials/ScreenSpaceCurvatureFlow.shader line 44 from

Code:
sampler2D_float _MainTex;

to

Code:
UNITY_DECLARE_DEPTH_TEXTURE(_MainTex);

?
Reply


Messages In This Thread
RE: How to make Obi Fluid work in Oculus Quest 2 - by josemendez - 28-04-2021, 02:05 PM