Old Standard Asset GlowEffect.cs in Unity 5.4

I have used a effect in Unity 4.6 from the Standard Assets called GlowEffect.cs and after upgrading to Unity versions 5x, the effect disappeared and no longer supported. Now I have upgraded my 2D game to Unity 5.4 beta and when GlowEffect is used a "pink screen" appears. This is a mobile game project and the last thing that's bugging me before the game fully upgraded. Can anyone help me and make suggestions how to fix this issue, problem is a few scripts within game reference this.
I'm not sure why Unity removed such effects without a full explanation, I know this is old topic but still can make it linked to Unity 5.4.

Thank you.

reimport the folder where the script / shaders are and report the errors, it should show some.

1 Like

Hey you are correct;

Assets/Plugins/Vectrosity/Image Based/GlowEffect.cs(55,88): warning CS0618: `UnityEngine.Material.Material(string)' is obsolete: `Creating materials from shader source string will be removed in the future. Use Shader assets instead.'

Assets/Plugins/Vectrosity/Image Based/GlowEffect.cs(94,79): warning CS0618: `UnityEngine.Material.Material(string)' is obsolete: `Creating materials from shader source string will be removed in the future. Use Shader assets instead.'

But I'm not sure what this means or how to use Shader assets instead?

Edit and the Shader has this error:
Both vertex and fragment programs must be present in a CGPROGRAM. Excluding it from compilation.

AFAIK eric needs to update that his end (Vectrosity) ?
Creating a shader from a string is indeed depreciated. Probably the change from cg to ms hlsl compiler has caused the error. You will need a new shader. Best bet is to flush all the old shaders from Unity and import the new ones, which are up to date. Unity cannot upgrade shaders from an old project, so you should import the updated ones manually.

Spoke to Eric, seems this effect somehow got added to his folder and nothing to do with Vectosity, we have multiple programmers work on the project so someone might have accidentally moved it there. The project as mentioned was started in Unity 4.6x and the shader with script comes in.

Standard Assets for Unity 4.6
the https://www.assetstore.unity3d.com/en/#!/content/21064

When 5x came out I noticed they released;

Standard Assets
https://www.assetstore.unity3d.com/en/#!/content/32351

GlowEffect is completely gone, I cannot find information on which others been removed. Anyway even if they have been removed some guidance should have been given on how to upgrade these effects to Unity 5x

Shaders are really a pain, anyway although this applies to all the 5x series, its only in Unity 5.3.3 -5.4 where the "Pink Screen" effect is visible.

I dunno if I need edit the actual GlowEffect.cs script or the Shader itself to fix the issue?
They do not have upgraded shader for 5x so that's why cannot simply import new assets.

To add: I found this thread

http://answers.unity3d.com/questions/914945/what-replaces-the-glow-effect-in-unity-5.html

I'd suggest the bloom filter from unity's cinematic post, it's nice and easily controlled. It's based off kino bloom.

I think there are two issues present: In Unity 5.4 Beta 10

Trying to create a material from string - this is no longer supported.
UnityEngine.Material:.ctor(String)
GlowEffect:get_blurMaterial() (at Assets/Plugins/Vectrosity/Image Based/GlowEffect.cs:94)
GlowEffect:OnRenderImage(RenderTexture, RenderTexture) (at Assets/Plugins/Vectrosity/Image Based/GlowEffect.cs:199)

So to learn for myself: How would I change this and fix this firstly even if Pink Screen still visible?