- Home /
materials turn pink after changing render pipeline asset
Hello,
I already red many different threads in this forum or elsewhere and I can't find a real solution. My problem is, I want to make a glowing outline, so I followed some tutorials and started using URP. This works so far, but if I change the Standard Shader Asset in the Graphics tab of my project settings, the Particle-systems I used got pink. I found out that this is because their is missing some references to the material, so I looked up and the material the particle system uses is the Default-Particle System. This material uses the standard unlit shader. How can I fix this, so I can use the Standard Shader from unity like before and my own which I created. I already tried Upgrade Project materials to URP materials. But I get the following error:
Outline_Material material was not upgraded. There's no upgrader to convert Shader Graphs/Outline_Shader shader to selected pipeline
To clarify, I just started working with shader. Just for a glowing outline effect. I called the shader Outline_Shader and the material which uses the shader Outline_Material. I want to add this material to all sprites which should have an glowing outline. Thats my idea in theory. I know this sort of questions have been posted several times, but I can't find any solution thats working.
edit: I just tried everything in a completly new project. I installed URP, add the asset in the project settings under graphics and the particle material changed to pink. Everything seems right, following other tutorials. But the next step (edit > RP > URP > Upgrade material) will not change anything.
You will likely need to rewrite this shader in a urp compatible way and then upgrade materials, but don't forget a backup before you make big changes like changing the render pipeline.
Thanks for the fast answer. But how can I do this?
I would recommend removing the shader from your project, keeping it somewhere else, upgrading materials and then re-importing the shader after it is back to normal.
Answer by Aviryx · Aug 25, 2020 at 04:16 PM
(This material uses the standard unlit shader) How can I fix this, so I can use the Standard Shader from unity like before and my own which I created.
The Built-In Render Pipeline and Scriptable Render Pipeline (URP/HDRP/Custom) are incompatible. This means you can not just mix and match different things from different pipelines. SRP fundamentally changed a lot of things. This is one of the reasons Unity is so persistent on pushing people to use ShaderGraph instead of writing custom HLSL as they keep changing it (only recently did URP get realtime support for shadows on point lights)
The only conceivable way to do what you want is to either
1) Redo your work in a single pipeline 2) Create your own customer shader that matches the Standard Shader (which is pretty hard as Unity keeps changing the names of stuff and there is not much to go on in therms of reference)
The problem that you will run into is that Unity has changed the names for various things in URP/HDRP so you are going to have to frankenstein a shader together if you want it to work.
URP Shader Template
https://gist.github.com/phi-lira/225cd7c5e8545be602dca4eb5ed111ba
Standard Unlit Shader
Shader "Particles/Standard Unlit"
{
Properties
{
_MainTex("Albedo", 2D) = "white" {}
_Color("Color", Color) = (1,1,1,1)
_Cutoff("Alpha Cutoff", Range(0.0, 1.0)) = 0.5
_BumpScale("Scale", Float) = 1.0
_BumpMap("Normal Map", 2D) = "bump" {}
_EmissionColor("Color", Color) = (0,0,0)
_EmissionMap("Emission", 2D) = "white" {}
_DistortionStrength("Strength", Float) = 1.0
_DistortionBlend("Blend", Range(0.0, 1.0)) = 0.5
_SoftParticlesNearFadeDistance("Soft Particles Near Fade", Float) = 0.0
_SoftParticlesFarFadeDistance("Soft Particles Far Fade", Float) = 1.0
_CameraNearFadeDistance("Camera Near Fade", Float) = 1.0
_CameraFarFadeDistance("Camera Far Fade", Float) = 2.0
// Hidden properties
[HideInInspector] _Mode ("__mode", Float) = 0.0
[HideInInspector] _ColorMode ("__colormode", Float) = 0.0
[HideInInspector] _FlipbookMode ("__flipbookmode", Float) = 0.0
[HideInInspector] _LightingEnabled ("__lightingenabled", Float) = 0.0
[HideInInspector] _DistortionEnabled ("__distortionenabled", Float) = 0.0
[HideInInspector] _EmissionEnabled ("__emissionenabled", Float) = 0.0
[HideInInspector] _BlendOp ("__blendop", Float) = 0.0
[HideInInspector] _SrcBlend ("__src", Float) = 1.0
[HideInInspector] _DstBlend ("__dst", Float) = 0.0
[HideInInspector] _ZWrite ("__zw", Float) = 1.0
[HideInInspector] _Cull ("__cull", Float) = 2.0
[HideInInspector] _SoftParticlesEnabled ("__softparticlesenabled", Float) = 0.0
[HideInInspector] _CameraFadingEnabled ("__camerafadingenabled", Float) = 0.0
[HideInInspector] _SoftParticleFadeParams ("__softparticlefadeparams", Vector) = (0,0,0,0)
[HideInInspector] _CameraFadeParams ("__camerafadeparams", Vector) = (0,0,0,0)
[HideInInspector] _ColorAddSubDiff ("__coloraddsubdiff", Vector) = (0,0,0,0)
[HideInInspector] _DistortionStrengthScaled ("__distortionstrengthscaled", Float) = 0.0
}
Category
{
SubShader
{
Tags { "RenderType"="Opaque" "IgnoreProjector"="True" "PreviewType"="Plane" "PerformanceChecks"="False" }
BlendOp [_BlendOp]
Blend [_SrcBlend] [_DstBlend]
ZWrite [_ZWrite]
Cull [_Cull]
ColorMask RGB
GrabPass
{
Tags { "LightMode" = "Always" }
"_GrabTexture"
}
Pass
{
Name "ShadowCaster"
Tags { "LightMode" = "ShadowCaster" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma target 2.5
#pragma shader_feature_local _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON
#pragma shader_feature_local _ _COLOROVERLAY_ON _COLORCOLOR_ON _COLORADDSUBDIFF_ON
#pragma shader_feature_local _REQUIRE_UV2
#pragma multi_compile_shadowcaster
#pragma multi_compile_instancing
#pragma instancing_options procedural:vertInstancingSetup
#pragma vertex vertParticleShadowCaster
#pragma fragment fragParticleShadowCaster
#include "UnityStandardParticleShadow.cginc"
ENDCG
}
Pass
{
Name "SceneSelectionPass"
Tags { "LightMode" = "SceneSelectionPass" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma target 2.5
#pragma shader_feature_local _ALPHATEST_ON
#pragma shader_feature_local _REQUIRE_UV2
#pragma multi_compile_instancing
#pragma instancing_options procedural:vertInstancingSetup
#pragma vertex vertEditorPass
#pragma fragment fragSceneHighlightPass
#include "UnityStandardParticleEditor.cginc"
ENDCG
}
Pass
{
Name "ScenePickingPass"
Tags{ "LightMode" = "Picking" }
BlendOp Add
Blend One Zero
ZWrite On
Cull Off
CGPROGRAM
#pragma target 2.5
#pragma shader_feature_local _ALPHATEST_ON
#pragma shader_feature_local _REQUIRE_UV2
#pragma multi_compile_instancing
#pragma instancing_options procedural:vertInstancingSetup
#pragma vertex vertEditorPass
#pragma fragment fragScenePickingPass
#include "UnityStandardParticleEditor.cginc"
ENDCG
}
Pass
{
Tags { "LightMode"="ForwardBase" }
CGPROGRAM
#pragma multi_compile __ SOFTPARTICLES_ON
#pragma multi_compile_fog
#pragma target 2.5
#pragma shader_feature_local _ _ALPHATEST_ON _ALPHABLEND_ON _ALPHAPREMULTIPLY_ON _ALPHAMODULATE_ON
#pragma shader_feature_local _ _COLOROVERLAY_ON _COLORCOLOR_ON _COLORADDSUBDIFF_ON
#pragma shader_feature_local _NORMALMAP
#pragma shader_feature _EMISSION
#pragma shader_feature_local _FADING_ON
#pragma shader_feature_local _REQUIRE_UV2
#pragma shader_feature_local EFFECT_BUMP
#pragma vertex vertParticleUnlit
#pragma fragment fragParticleUnlit
#pragma multi_compile_instancing
#pragma instancing_options procedural:vertInstancingSetup
#include "UnityStandardParticles.cginc"
ENDCG
}
}
}
Fallback "VertexLit"
CustomEditor "StandardParticlesShaderGUI"
}
Answer by Sagan200 · Aug 29, 2020 at 03:35 PM
Hello guys. I just solved this problem with a friend and created a material with a shader based on the URP and added a texture to this material which comes close to the original particle system texture. Thanks for your help guys. This thread can be closed, if Threads are getting closed here.
Answer by MrDude · Mar 31, 2021 at 12:58 PM
@Aviryx I still want to know why my material, that works fine as a Unity Standard material, when I click on the menu option to convert it from Unity Standard to URP it then makes my material show only pink. Why is that? I thought Standard to URP/Lit was allowed so.... why is it doing that?
Answer by Symo7 · Jul 12, 2021 at 01:28 PM
I got this when converting from standard to URP materials - all I had to do was:
Edit -> Render Pipeline -> Upgrade Materials...
Create (in Project tab) Rendering -> URP -> Pipeline Asset (Forward Renderer)
Project Settings -> Graphics -> Set 'Scriptable Render Pipeline Settings' to the settings created in 2
Project Settings -> Quality -> Do the same as 3 for the 'Rendering' settings.
Gradually the pink materials got sorted (clicking on them makes them refresh).
Your answer
![](https://koobas.hobune.stream/wayback/20220613010428im_/https://answers.unity.com/themes/thub/images/avi.jpg)