Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Glow 11 - for desktop and mobile

Discussion in 'Assets and Asset Store' started by SRH, May 1, 2013.

  1. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    Just upgraded to 4.5 and now the glow effect is messed up.

    Thanks

    $Screen Shot 2014-05-29 at 8.09.16 PM.png
     
  2. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    I can confirm that this otherwise excellent plugin doesn't work correctly in Unity 4.5.

    $Skärmavbild 2014-06-01 kl. 16.06.39.png
     
    Last edited: Jun 1, 2014
  3. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Anti-aliasing off and try. if work for you?
     
  4. aresgameshk

    aresgameshk

    Joined:
    May 19, 2014
    Posts:
    32
    Hi, does anyone know how do I change Glow Source via Code at runtime?
     
  5. uchodhry

    uchodhry

    Joined:
    Nov 22, 2012
    Posts:
    7
    Hi

    I am using a vertex displacement shader and the glows are not working properly the glows are rendered at the original vertex position. is there any fix for that?

    Screen Shot 2014-06-12 at 4.26.17 PM.png
     
  6. jeslinger

    jeslinger

    Joined:
    Jul 6, 2012
    Posts:
    8
    Hi,

    Running into a problem when using Render Texture cameras and regular cameras. I'm using Unity 4.5 pro with the latest version of your plugin. The rendering path is forward with anti-aliasing turned on. Without modifying anything, the render textures work fine. However, cameras with clear flags set to depth only, glows are upside down. When I downloaded your patch (glow11_1.0.8_dx_aa_fix), it fixes the cameras set the depth only but now render texture glows are upside down. Any ideas?

    Thanks!
     
  7. schragnasher

    schragnasher

    Joined:
    Oct 7, 2012
    Posts:
    117
    Are you using any other image effects?
     
  8. jeslinger

    jeslinger

    Joined:
    Jul 6, 2012
    Posts:
    8
    Nope, Glow 11 is the only image effect running. However, I do have the plug-in running on both cameras. Could that cause issues?
     
  9. schragnasher

    schragnasher

    Joined:
    Oct 7, 2012
    Posts:
    117
    It shouldn't, each camera is rendered separately. Are you running the latest 4.5 update?
     
  10. ChinaWhite

    ChinaWhite

    Joined:
    May 27, 2014
    Posts:
    8
    sistematically getting this error/ warning:

    Tiled GPU perf. warning: RenderTexture color surface (0x0) was not cleared/discarded, doing <run with profiler for info>
    UnityEngine.Graphics:Blit(Texture, RenderTexture)
    Glow11.Glow11:OnRenderImage(RenderTexture, RenderTexture)


    Appreciate help thanks
    egi
     
  11. ChinaWhite

    ChinaWhite

    Joined:
    May 27, 2014
    Posts:
    8
    How do you guys created the trailing effect of the demo scene for weplayer. that demo scene is not included in the package would be helppuf actually
    eg
     
  12. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    Getting really tired of waiting for a fix. Unity 4.5 was released over a month ago - and not a word from the author.

    Do not buy this plugin until it's been fixed.
     
  13. aresgameshk

    aresgameshk

    Joined:
    May 19, 2014
    Posts:
    32
    Hello Author, currently Glow 11 doesn't support any shaders with any kind of UV manipulation. Will this be supported in the future?
     
  14. aresgameshk

    aresgameshk

    Joined:
    May 19, 2014
    Posts:
    32
    Just to demonstrate the above issue regarding UV manipulation,
    the below screenshot shows a transparent shader that rotates the UV by 90 degress:

    glow2.jpg

    Glow is correct for the shader without any UV manipulation, but wrong for the roated UV.
     
  15. The Neken

    The Neken

    Joined:
    Jul 30, 2012
    Posts:
    2
    Hi,

    I wonder how i can change settings to get effect like in Your WebPlayer. I want to have only border of my cubes to be glow, Thanks
     
  16. schragnasher

    schragnasher

    Joined:
    Oct 7, 2012
    Posts:
    117
  17. yezzer

    yezzer

    Joined:
    Oct 30, 2009
    Posts:
    143
    This doesn't work with the latest Oculus plugin, 0.3.2. I tried the fixes in the posts. Any chance of an update?
     
  18. EvalDaemon

    EvalDaemon

    Joined:
    Aug 8, 2013
    Posts:
    107
    I did come up with a hack FIX for the upside behavior. Add a second Glow11 Effect to the camera and reduce the first ones strength settings all the way down.
    I think this is happening when you have Glow11 attached to multiple cameras. If you have just one camera with glow11 for me it works fine. When I attach it to a second camera say for UI that is when it gets weird, but by adding the extra version to the camera that is messed up it corrects.
    The author really needs to look into and fix this as it is an awesome package minus this bug.
     
  19. tolgamyth

    tolgamyth

    Joined:
    Jan 14, 2014
    Posts:
    4
    Hey, this plugin is not working properly on some samsung devices. My screen is totally blurred but the glowing objects.Is there a setting to overcome this issue?
     
  20. Kameesabee

    Kameesabee

    Joined:
    Aug 24, 2013
    Posts:
    1
    Hi, I have the glow setup and working in unity 4.3.4f1, however, when the Viewport Rect is not X:0, Y:0, W:1, H:1, the glow are offset. It's as if the glow was set up for that viewport rect. Is there a way that I can fix that so it can work with a different viewport rect? Such as X:0, Y:0.119, W:1, H:0.758. Thanks ahead of time.
     
    Last edited: Jul 15, 2014
  21. tolgamyth

    tolgamyth

    Joined:
    Jan 14, 2014
    Posts:
    4
    i think disabling antialising resolves my this issue, how ever if anitialising is necessary for your game use mobile friendly glow packages.
     
  22. hsr38

    hsr38

    Joined:
    Aug 15, 2012
    Posts:
    3
    Please!!!! Fix unity 4,5 bug!! Everything is a mess for android deployment
     
  23. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    Getting rid of this product from my project now. More than two months of total silence from the author de facto means it's unsupported and abandoned. Such a waste.
     
  24. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    Anyone heard of an update? Can't believe it actually still doesn't work!
     
  25. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    Has anyone made this work with the Oculus Rift DK2 and their 0.4SDK? I use this on the non-Rift versions of my game without any issues, but I'm not seeing any glow in the DK2.

    Thanks!
     
  26. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    From what I can gather, the DK2 problem is with the Oculus SDK, not Glow 11.
     
  27. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Any new about a fix?! :mad:
     
  28. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    I wish there was!!! Literally can't believe the developer fell off the planet. The only thing I can figure is that he had big personal life issues and can't come back to Unity at the moment. I hope he knows how much people appreciated this asset and that he will fix it when he can. Its too bad because theres nothing else on the asset store remotely similar... Mobile bloom isn't really good at all compared to glow11.
     
  29. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    Yeah, this makes me sad. I need to jump to Unity 4.5 for the mobile versions of my latest game.

    I vote for some people starting their own open-source project for a replacement for Glow 11. Anyone have spare time? ;)
     
  30. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    I was thinking about it, but I have literally no idea how to write full screen effects. It personally seems like magic to me.

    Perhaps we could edit mobile bloom's script so that it appears closer to that of glow11's?
     
    Last edited: Sep 30, 2014
    Play_Edu likes this.
  31. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    It looks like Glow 11 is no longer on the Asset Store. Does anyone know of an alternative that's as fast on mobile and is getting good support/updates?
     
    root8888 likes this.
  32. opsive

    opsive

    Joined:
    Mar 15, 2010
    Posts:
    5,122
    Glow Effect :) I still need to figure out how the new standard shader works to be able to add glow to that but aside from that it is ready for Unity 5 as well.
     
  33. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    Yeah, I tried that one before settling on Glow11 for my game Unpossible. Glow11 was faster. Both looked good though.
     
  34. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    I went with Heathen's Selective Glow Essentials. Pro only, though.
     
  35. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    That one looks good. How's the performance compared to Glow11? What platforms have you tried it on?

    Thanks!
     
  36. PeterB

    PeterB

    Joined:
    Nov 3, 2010
    Posts:
    366
    Personally I've only tested it with desktop builds, but its forum thread seems to indicate it is considerably faster and more reliable than Glow11, especially on mobile units.
     
  37. Groucho

    Groucho

    Joined:
    Dec 24, 2009
    Posts:
    73
    Awesome, thanks. I'll try it out!
     
  38. Caprain-Nova

    Caprain-Nova

    Joined:
    May 15, 2013
    Posts:
    10
    Nice Asset, but. With glow 11 script on camera increases twice. Ever shader isn't used
     
  39. willtrax

    willtrax

    Joined:
    Feb 9, 2013
    Posts:
    14
    In case anyone is still using this shader and runs into trouble upgrading to Unity 5, here's a process for modifying part of the shader code so the glow effect works again:

    Find the file Glow11GlowObjects

    Note that in the inspector you may see the phrase: "unity variable 'o' used without having been initialized"

    Double click this error to show the shader code. Find the line containing: "v2f o;" Below this line, add the following:

    UNITY_INITIALIZE_OUTPUT(v2f, o);

    Reimport the Glow11GlowObjects file. This will hopefully get the glow shader working with the camera again.

    Followup Edit:
    Also requires a change to file AdvancedBlur

    line reading: #define OFFSETFUNC offsetX

    OFFSETFUNC is used elsewhere in the file and needs to be renamed. I simply renamed mine to OFFSETFUNC1. The subsequent references to OFFSETFUNC below that line also need to be updated to the new name.
     
    Last edited: Mar 26, 2015
  40. MrClicker89

    MrClicker89

    Joined:
    Feb 16, 2014
    Posts:
    5
    Hello. Is there any way to buy this Glow 11 package?
     
  41. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
  42. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    Hello all! I refuse to give up on glow11 because it is so much better than any other asset I've tried. As such, I've gone and manipulated the offset settings to see if doing so would correct the glow in 4.6. And it worked! Here is the code I changed in the Glow11BlurGL shader:

    Code (CSharp):
    1. o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
    2. o.uv[0] = v.texcoord[0] + float4(offX*.5,offY*.5,1,0);
    3. o.uv[1] = v.texcoord[1]+ float4(-offX*1.5,-offY*1.5,1,0);
    4. o.uv[2] = v.texcoord[2]+ float4(-offX,-offY,1.5,0);
    5. o.uv[3] = v.texcoord[3] + float4(-offX,-offY,1,0);
    6. o.uv[4] = v.texcoord[4] + float4(-offX,-offY,1,0);
    Now the only issue left with the glow11 asset is that when using the gl blur, occasionally the screen will flash with the color of the blur currently on screen. Would anyone happen to know why this occurs? Really want to use this asset in my project!

    Edit: Ok, looks like this is the line thats causing the problem:
    o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
    regardless if the offsets are used or not. Specifically, it seems the project part of the matrix is the thing thats causing the issue. How come the projection would cause screen flashing? Does anyone who understands shader stuff better that I know why this may be and how to fix it?
     
    Last edited: Jul 26, 2015
  43. paraself

    paraself

    Joined:
    Jun 30, 2012
    Posts:
    139
    almost
    some months ago, I got contact with the author, and he said he was too busy to continue with glow11, but he's nice and shared with me the source code. I'll ask him again if he is willing to open source glow11 and hopefully we can make glow11 glowing again.
     
    TooManySugar likes this.
  44. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    That would be awesome! I contacted him too a while a back and he said he was still trying to figure out what to do haha. It would be lovely if you could ask him for us! Gotta ask though, did you fix the code for U4.6? I'm not even entirely sure what in the source code would need messing with to fix the issue… It seemed to me that it was the shaders that needed fixing, but I really don't know for sure.
     
  45. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    People! Just wanted to report that I have finally figured out the problem! For all of those who want quality, cheap glow on Unity 4.6, simply replace your glow11GL file with this edit:

    Code (CSharp):
    1. // ----------------------------------------------------------------------------
    2. // Glow 11
    3. // Copyright ツゥ 2013 Sven Herrmann
    4. // ----------------------------------------------------------------------------
    5. Shader "Hidden/Glow 11/Blur GL" {
    6.     Properties {
    7.         _MainTex ("", 2D) = "" {}
    8.     }
    9.  
    10.     CGINCLUDE
    11.  
    12.     #include "UnityCG.cginc"
    13.    
    14.     struct v2f {
    15.         half4 pos : POSITION;
    16.         half4 uv[5] : TEXCOORD0;
    17.     };
    18.  
    19.     sampler2D _MainTex;
    20.         half4 _MainTex_TexelSize;
    21.        
    22.     struct appdata_glow {
    23.         half4 vertex : POSITION;
    24.         half4 texcoord[5] : TEXCOORD;
    25.     };
    26.  
    27.     v2f vert( appdata_glow v )
    28.     {
    29.         v2f o;
    30.        float offX = _MainTex_TexelSize.x;
    31.         float offY = _MainTex_TexelSize.y;
    32.        
    33.         o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
    34.         o.uv[0] = v.texcoord[0] + float4(offX*.5,offY*.5,0,0);
    35.         o.uv[1] = v.texcoord[1]+ float4(-offX*1.5,-offY*1.5,0,0);
    36.         o.uv[2] = v.texcoord[2]+ float4(-offX,-offY,0,0);
    37.         o.uv[3] = v.texcoord[3] + float4(-offX,-offY,0,0);
    38.         o.uv[4] = v.texcoord[4] + float4(-offX,-offY,0,0);
    39.         return o;
    40.        
    41. //         o.uv[0] = v.texcoord[0] + float4(offX*.5,offY,1,0);
    42. //        o.uv[1] = v.texcoord[1]+ float4(-offX*1.2,-offY*1.2,1,0);
    43. //        o.uv[2] = v.texcoord[2]+ float4(-offX*1.5,-offY,1.2,0);
    44. //        o.uv[3] = v.texcoord[3] + float4(-offX,-offY,1,0);
    45. //        o.uv[4] = v.texcoord[4] + float4(-offX,-offY,1,0);
    46. //            return o;
    47.     }
    48.  
    49.     fixed4 frag(v2f pixelData) : COLOR
    50.     {
    51.         return tex2D(_MainTex, pixelData.uv[0]) * .2270270270 +
    52.             (tex2D(_MainTex, pixelData.uv[1]) + tex2D(_MainTex, pixelData.uv[2])) * .3162162162; //+
    53.            // (tex2D(_MainTex, pixelData.uv[3]) + tex2D(_MainTex, pixelData.uv[4])) * .0702702703;
    54.     }
    55.  
    56.     ENDCG
    57.  
    58.     Subshader {
    59.         Pass {
    60.           ZTest Always Cull Off ZWrite Off
    61.           Fog { Mode off }
    62.           ColorMask RGB
    63.        
    64.           CGPROGRAM
    65.           #pragma glsl
    66.           #pragma only_renderers gles opengl
    67.           #pragma fragmentoption ARB_precision_hint_fastest
    68.           #pragma vertex vert
    69.           #pragma fragment frag
    70.           ENDCG
    71.         }
    72.     }
    73.    
    74.     Fallback off
    75.  
    76. }
    Happy coding!
     
    TooManySugar likes this.
  46. paraself

    paraself

    Joined:
    Jun 30, 2012
    Posts:
    139
    Got chance to really tinker the glow11's Blur GL code, here is my results.

    First as what you have modified that shader, it seems that you changed the blur matrix, which probably will change the blur results, though I have not tried yours, but it feels not reliable. Also as what you said in the PM that it does not work with Metal on iOS, it's prbly related to the using of multiple tex coordinates.

    After looking into the Glow11.dll, I found the problem which cause the Blur GL does not work. Here is the solution:
    Locate the BlurBase.cs file and change:
    Code (CSharp):
    1. Graphics.BlitMultiTap(buffer, buffer2, this.blurMaterial, this.blurOffsetsHorizontal);
    2. buffer.DiscardContents();
    3. Graphics.BlitMultiTap(buffer2, buffer, this.blurMaterial, this.blurOffsetsVertical);
    to:

    Code (CSharp):
    1. Graphics.Blit(buffer,buffer2,this.blurMaterial,0);
    2. Graphics.Blit(buffer2,buffer,this.blurMaterial,1);
    Besides, use this shader below as the Blur GL shader, that's to say, replace the old one.

    Code (CSharp):
    1. Shader "Hidden/Glow 11/Blur GL" {
    2.     Properties {
    3.         _MainTex ("", 2D) = "" {}
    4.     }
    5.  
    6.     CGINCLUDE
    7.  
    8.     #include "UnityCG.cginc"
    9.  
    10.     sampler2D _MainTex;
    11.     half2 _MainTex_TexelSize;
    12.     const half al = 1.38461542h;
    13.     const half bl = 3.23076916h;
    14.  
    15.       fixed4 frag_vertical(v2f_img pixelData) : COLOR
    16.     {
    17.         fixed4 c1 = tex2D(_MainTex, pixelData.uv);
    18.         fixed4 c2 = tex2D(_MainTex, pixelData.uv + half2(0,_MainTex_TexelSize.y * al));
    19.         fixed4 c3 = tex2D(_MainTex, pixelData.uv - half2(0,_MainTex_TexelSize.y * al));
    20.         fixed4 c4 = tex2D(_MainTex, pixelData.uv + half2(0,_MainTex_TexelSize.y * bl));
    21.         fixed4 c5 = tex2D(_MainTex, pixelData.uv - half2(0,_MainTex_TexelSize.y * bl));
    22.      
    23.         return c1 * 0.2270270270 + (c2 + c3) * 0.3162162162 + (c4 + c5) * 0.0702702703;
    24.      
    25.     }
    26.  
    27.     fixed4 frag_horizontal(v2f_img pixelData) : COLOR
    28.     {
    29.         fixed4 c1 = tex2D(_MainTex, pixelData.uv);
    30.         fixed4 c2 = tex2D(_MainTex, pixelData.uv + half2(_MainTex_TexelSize.x * al,0));
    31.         fixed4 c3 = tex2D(_MainTex, pixelData.uv - half2(_MainTex_TexelSize.x * al,0));
    32.         fixed4 c4 = tex2D(_MainTex, pixelData.uv + half2(_MainTex_TexelSize.x * bl,0));
    33.         fixed4 c5 = tex2D(_MainTex, pixelData.uv - half2(_MainTex_TexelSize.x * bl,0));
    34.      
    35.         return c1 * 0.2270270270 + (c2 + c3) * 0.3162162162 + (c4 + c5) * 0.0702702703;
    36.      
    37.     }
    38.  
    39.     ENDCG
    40.  
    41.     Subshader {
    42.         //pass 0
    43.         Pass {
    44.           ZTest Always Cull Off ZWrite Off
    45.           Fog { Mode off }
    46.           ColorMask RGB
    47.      
    48.           CGPROGRAM
    49.           #pragma glsl
    50.           #pragma only_renderers gles opengl
    51.           #pragma fragmentoption ARB_precision_hint_fastest
    52.           #pragma vertex vert_img
    53.           #pragma fragment frag_vertical
    54.           ENDCG
    55.         }
    56.      
    57.         //pass 1
    58.         Pass {
    59.           ZTest Always Cull Off ZWrite Off
    60.           Fog { Mode off }
    61.           ColorMask RGB
    62.      
    63.           CGPROGRAM
    64.           #pragma glsl
    65.           #pragma only_renderers gles opengl
    66.           #pragma fragmentoption ARB_precision_hint_fastest
    67.           #pragma vertex vert_img
    68.           #pragma fragment frag_horizontal
    69.           ENDCG
    70.         }
    71.     }
    72.    
    73.     Fallback off
    74.  
    75. }
    Hope this helps. The reason why I changed the Graphics.BlitMultiTap, is because this API is bringing a lot of troubles, it requires shaders using _BlurOffset, and mysteriously no matter how many offset vectors you pass in that api, there is only one recognized in shader. Therefore, since BlurBase.cs only want a two pass, vertical-horizontal blur, it's just better to do it all in shader with two simple Graphics.Blit. ;D
     
  47. paraself

    paraself

    Joined:
    Jun 30, 2012
    Posts:
    139
    ok, advanced Blur is also working now. Solution is simple. In AdvancedBlur.cginc, when seeing #define OFFSETFUNC offsetX, or #define OFFSETFUNC offsetY, replace all the following OFFSETFUNC with offsetX, or offsetY. That's to say, do not use these macros. Locate Glow11AdvancedBlur.shader, notice there are two subshaders, one is for shader model 2.0 and the other for 3.0, remove the 2.0 one. Now everything should work. Tested in Unity 5.1.1
     
  48. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    Awesome! Thanks so much! Did you try this yet? I'm away from my computer at the moment, but I'll try it when I can!
     
  49. paraself

    paraself

    Joined:
    Jun 30, 2012
    Posts:
    139
    its tested in my 2d game inside Unity editor. I did not test mine in 3d, nor in iOS metal TT. But let me know if you encounter any problems, willing to help:D
     
  50. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    686
    Sweet! Much appreciated!

    One issue though, I don't have blurbase.cs, isn't that a file in the dll? I don't have the source code…