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
(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?
(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
(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.
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.
(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!
Glad it works!
Let me know if you need any help.