Help URP Shader Error - Printable Version +- Obi Official Forum (https://obi.virtualmethodstudio.com/forum) +-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html) +--- Forum: Obi Fluid (https://obi.virtualmethodstudio.com/forum/forum-3.html) +--- Thread: Help URP Shader Error (/thread-3953.html) |
URP Shader Error - Yumineko - 31-07-2023 (I apologize if there are any flaws or rudeness due to machine translation.) When I create a new project with "3D(URP)" and import Obi Fluid, I get an error in the following Shader inspector. If I build on Windows Intel 64bit environment in this state, the fluid that was normally displayed in Editor will not be rendered. Obi/Resources/ObiMaterials/URP/FluidShaderURP Code: Implicit truncation of vector type Obi/Resources/ObiMaterials/URP/ParticleShaderURP Code: 'BuildAuxiliaryNormalVectors': implicit truncation of vector type Obi/Resources/ObiMaterials/URP/SimpleParticleShaderURP Code: 'BillboardSphereNormals': implicit truncation of vector type There were no errors in the following Shader.
RE: URP Shader Error - josemendez - 31-07-2023 (31-07-2023, 11:31 AM)Yumineko Wrote: (I apologize if there are any flaws or rudeness due to machine translation.)Hi! Implicit truncation warnings aren't a concern, they just mean the compiler will automatically convert a float4 to a float3 (or a float3 to a float2, etc) by ignoring the last component. This will raise a warning in some graphics APIs. As long as there are no errors, the shaders should work. The only remaining possible cause is that the assets simply aren't being included in the build for some reason. They're within a "Resources" folder so this shouldn't be the case, but let's assume they're not making it into the build. To check this, go to ProjectSettings->Graphics->Always Included Shaders and include these shaders in the list: Obi/Resources/ObiMaterials/FluidThickness Obi/Resources/ObiMaterials/ScreenSpaceCurvature Obi/Resources/ObiMaterials/NormalReconstruction Obi/Resources/ObiMaterials/URP/FluidShader Then do a build, see if it makes any difference. In case it doesn't, would you mind sending us your project (or a smaller project that reproduces this issue, in case yours is too large) to support(at)virtualmethodstudio.com so that we can take a closer look? Thanks! (31-07-2023, 11:31 AM)Yumineko Wrote: Other concerns This is not an error, just Unity offering to automatically update imported scripts to use the latest available APIs. Depending on the Unity version used this message might appear, either answer to it is valid. Obi is designed to be compatible with Unity 2019.4 upwards, so more recent versions might show this message. (31-07-2023, 11:31 AM)Yumineko Wrote: When importing the packages required for Burst in Obi Renderer, a compile error occurs at line 74 of "Obi\Scripts\Common\Backends\Burst\DataStructures\NativeMultilevelGrid.cs" ( (Fixed by setting length to Length). Newer versions of the packages might have changed the definition of "length" to "Length", will take a look into it. Updating the capitalization should be enough. kind regards, RE: URP Shader Error - josemendez - 02-08-2023 Hi, Just answered you via email, but I'm also writing it here in case it's useful for other users. In newer URP package versions, the tag used to identify URP-only shaders has changed from "UniversalRenderPipeline" to "UniversalPipeline". This will prevent shaders from working in builds using recent URP versions, although they'll work fine in editor (quite sure this is a bug in Unity, as it would stand to reason for the shader to stop working in both editor and builds when using an incorrect tag). Open up the "Obi/Resources/ObiMaterials/URP/FluidShaderURP.shader" file, and change this line at the top: Code: Tags{"RenderPipeline" = "UniversalRenderPipeline"} so that it looks like this: Code: Tags{"RenderPipeline" = "UniversalPipeline"} That is, just remove the "Render" word in the tag. Then build your project again, and it should work. The same applies to any other URP shaders included with Obi, and others you might find around or be part of other assets. I've posted about this in the Unity forums: https://forum.unity.com/threads/renderpipeline-tag-changed.1468196/ Will include this change in the next Obi version. kind regards, |