Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help  Everything appears pink after setting the ObiFluidRendererFeature to the pipeline
#1
Hi All,

Just bought obi fluid 5.5, tried to follow steps to enable for URP

But everything appears pink after setting ObiFluidRendererFeature to my pipeline's renderer feature list

& also this shader error:

Code:
Shader error in 'Obi/URP/Fluid/FluidShading': undeclared identifier '_FluidSurface' at Assets/3rd Party Assets/Obi/Resources/ObiMaterials/URP/ObiFluidsURP.cginc(47) (on d3d11)

Compiling Vertex program with FLUID_LIGHTING FLUID_REFLECTION
Platform defines: UNITY_ENABLE_REFLECTION_BUFFERS UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_RGBM_ENCODING

Unity Version: 2019.3.15f1
URP: 7.4.3

Building for Oculus Quest


Please Advise
Reply
#2
Hi there,

This is due to an issue with URP and certain rendering APIs. The workaround is relatively simple and will be included in next week's 5.6 release. See:
http://obi.virtualmethodstudio.com/forum...-2464.html

let me know if I can be of further help.
Reply
#3
(10-09-2020, 08:41 AM)josemendez Wrote: Hi there,

This is due to an issue with URP and certain rendering APIs. The workaround is relatively simple and will be included in next week's 5.6 release. See:
http://obi.virtualmethodstudio.com/forum...-2464.html

let me know if I can be of further help.

Hi josemendez,

Thanks for the prompt reply.

But the workaround only meant the shader... what about the forward renderer URP problem
Reply
#4
(10-09-2020, 09:03 AM)qwzzz Wrote: Hi josemendez,

Thanks for the prompt reply.

But the workaround only meant the shader... what about the forward renderer URP problem

A pink screen always mean a shader could not be compiled for the target platform/API combination. Unity uses a pink shader as a replacement for shaders that it could not compile.

Fixed all shader errors, the renderer should work correctly. Are there any other errors popping up?
Reply
#5
(10-09-2020, 09:20 AM)josemendez Wrote: A pink screen always mean a shader could not be compiled for the target platform/API combination. Unity uses a pink shader as a replacement for shaders that it could not compile.

Fixed all shader errors, the renderer should work correctly. Are there any other errors popping up?

no errors, no warnings either
Checking that makes the entire scene pink
i was referring to this:https://imgur.com/VzRbvUU
Reply
#6
(10-09-2020, 09:39 AM)qwzzz Wrote: no errors, no warnings either
Checking that makes the entire scene pink
i was referring to this:https://imgur.com/VzRbvUU

Hi,

Yes, that's the renderer feature. It uses many different shaders to render the fluid to the screen.
It's just not possible for the entire screen to be pink if there are no compilation errors in any shader. Try the following:

- Go to the Obi/Resources/ObiMaterials folder in the project view.
- Select all shader files there, one by one, check if any errors are shown in the inspector.

- Go to the Obi/Resources/ObiMaterials/URP folder in the project view.
- Again, select all shader files there, and check if any errors are shown in the inspector.
Reply
#7
(10-09-2020, 09:47 AM)josemendez Wrote: Hi,

Yes, that's the renderer feature. It uses many different shaders to render the fluid to the screen.
It's just not possible for the entire screen to be pink if there are no compilation errors in any shader. Try the following:

- Go to the Obi/Resources/ObiMaterials folder in the project view.
- Select all shader files there, one by one, check if any errors are shown in the inspector.

- Go to the Obi/Resources/ObiMaterials/URP folder in the project view.
- Again, select all shader files there, and check if any errors are shown in the inspector.

Code:
Shader error in 'Obi/URP/Fluid/FluidShading': unrecognized identifier 'sampler2D_CameraOpaqueTexture' at Assets/3rd Party Assets/Obi/Resources/ObiMaterials/URP/ObiFluidsURP.cginc(12) (on d3d11)

Compiling Vertex program
Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_DLDR_ENCODING

Code:
Shader warning in 'Obi/URP/Fluid/FluidShading': implicit truncation of vector type at Assets/3rd Party Assets/Obi/Resources/ObiMaterials/URP/ObiLightingURP.cginc(10) (on d3d11)

Compiling Vertex program
Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_DLDR_ENCODING

Code:
Shader warning in 'Obi/URP/Fluid/FluidShading': implicit truncation of vector type at Assets/3rd Party Assets/Obi/Resources/ObiMaterials/URP/ObiLightingURP.cginc(17) (on d3d11)

Compiling Vertex program
Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_DLDR_ENCODING

[code]Shader warning in 'Obi/URP/Fluid/FluidShading': implicit truncation of vector type at Assets/3rd Party Assets/Obi/Resources/ObiMaterials/URP/ObiLightingURP.cginc(30) (on d3d11)



Compiling Vertex program
Platform defines: UNITY_NO_DXT5nm UNITY_ENABLE_REFLECTION_BUFFERS UNITY_NO_CUBEMAP_ARRAY UNITY_USE_DITHER_MASK_FOR_ALPHABLENDED_SHADOWS UNITY_PBS_USE_BRDF1 UNITY_SPECCUBE_BOX_PROJECTION UNITY_SPECCUBE_BLENDING UNITY_ENABLE_DETAIL_NORMALMAP SHADER_API_DESKTOP UNITY_LIGHT_PROBE_PROXY_VOLUME UNITY_LIGHTMAP_DLDR_ENCODING[/code]
Reply
#8
Hi there,

There's a typo in Assets/Obi/Resources/ObiMaterials/URP/ObiFluidsURP.cginc.

"sampler2D_CameraOpaqueTexture"

should be

"sampler2D _CameraOpaqueTexture"

Note the whitespace between the variable type and its name. If you put it all together with no spaces, the compiler will think it's a type, and will rightly complain that "sampler2D_CameraOpaqueTexture" is not defined anywhere.
Reply
#9
(10-09-2020, 10:17 AM)josemendez Wrote: Hi there,

There's a typo in Assets/Obi/Resources/ObiMaterials/URP/ObiFluidsURP.cginc.

"sampler2D_CameraOpaqueTexture"

should be

"sampler2D _CameraOpaqueTexture"

Note the whitespace between the variable type and its name. If you put it all together with no spaces, the compiler will think it's a type, and will rightly complain that "sampler2D_CameraOpaqueTexture" is not defined anywhere.

Thanks! that solves the problem!
Reply
#10
Glad it works! Sonrisa Let me know if you need any help.
Reply