28-04-2021, 02:05 PM
(This post was last modified: 28-04-2021, 02:10 PM by josemendez.)
(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 ). 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);
?