Search Unity

Official New Post-processing Stack (Pre-Release)

Discussion in 'Image Effects' started by Chman, Oct 10, 2016.

  1. AFrisby

    AFrisby

    Joined:
    Apr 14, 2010
    Posts:
    223
    Hi there,

    We're seeing "everything broken" on some OSX clients (Mac Pro users) since upgrading to 5.6.1 - it works fine in 5.6.0f3, but 5.6.0p3 and onwards seems to have broken the post stack.

    We are seeing this error in the console;

    Code (csharp):
    1.  
    2. -------- Shader compilation failed
    3. #version 150
    4. #extension GL_ARB_explicit_attrib_location : require
    5. #extension GL_ARB_shader_bit_encoding : enable
    6. uniform     vec4 _ZBufferParams;
    7. uniform     vec4 _MainTex_TexelSize;
    8. uniform     vec4 _ProjInfo;
    9. uniform     vec4 hlslcc_mtx4x4_WorldToCameraMatrix[4];
    10. uniform     vec4 hlslcc_mtx4x4_CameraToWorldMatrix[4];
    11. uniform     vec4 hlslcc_mtx4x4_ProjectToPixelMatrix[4];
    12. uniform     vec2 _ScreenSize;
    13. uniform     float _RayStepSize;
    14. uniform     float _MaxRayTraceDistance;
    15. uniform     float _LayerThickness;
    16. uniform     float _FresnelFade;
    17. uniform     float _FresnelFadePower;
    18. uniform     int _TreatBackfaceHitAsMiss;
    19. uniform     int _AllowBackwardsRays;
    20. uniform     float _ScreenEdgeFading;
    21. uniform     int _MaxSteps;
    22. uniform     float _FadeDistance;
    23. uniform     int _TraceBehindObjects;
    24. uniform  sampler2D _CameraDepthTexture;
    25. uniform  sampler2D _CameraGBufferTexture1;
    26. uniform  sampler2D _CameraGBufferTexture2;
    27. in  vec2 vs_TEXCOORD1;
    28. layout(location = 0) out vec4 SV_Target0;
    29. vec4 u_xlat0;
    30. vec4 u_xlat10_0;
    31. vec3 u_xlat1;
    32. vec4 u_xlat10_1;
    33. vec3 u_xlat2;
    34. vec4 u_xlat10_2;
    35. vec3 u_xlat3;
    36. vec3 u_xlat4;
    37. vec4 u_xlat5;
    38. vec3 u_xlat6;
    39. vec4 u_xlat7;
    40. vec3 u_xlat8;
    41. float u_xlat9;
    42. bvec2 u_xlatb9;
    43. vec2 u_xlat10;
    44. vec2 u_xlat11;
    45. vec4 u_xlat10_12;
    46. vec3 u_xlat13;
    47. vec3 u_xlat16_13;
    48. bool u_xlatb13;
    49. float u_xlat19;
    50. bool u_xlatb19;
    51. float u_xlat22;
    52. float u_xlat26;
    53. bool u_xlatb26;
    54. vec2 u_xlat30;
    55. vec2 u_xlat32;
    56. bool u_xlatb32;
    57. vec2 u_xlat33;
    58. int u_xlati33;
    59. vec2 u_xlat35;
    60. int u_xlati35;
    61. bvec2 u_xlatb35;
    62. vec2 u_xlat36;
    63. float u_xlat39;
    64. bool u_xlatb39;
    65. float u_xlat40;
    66. bool u_xlatb40;
    67. float u_xlat41;
    68. bool u_xlatb41;
    69. float u_xlat42;
    70. bool u_xlatb42;
    71. float u_xlat44;
    72. int u_xlati44;
    73. int u_xlati45;
    74. int u_xlati46;
    75. int u_xlati47;
    76. float u_xlat48;
    77. int u_xlati48;
    78. bool u_xlatb48;
    79. void main()
    80. {
    81.     u_xlat10_0 = texture(_CameraDepthTexture, vs_TEXCOORD1.xy);
    82.     u_xlat0.x = _ZBufferParams.z * u_xlat10_0.x + _ZBufferParams.w;
    83.     u_xlat0.x = float(1.0) / u_xlat0.x;
    84.     u_xlat1.z = (-u_xlat0.x);
    85.     u_xlat10_2 = texture(_CameraGBufferTexture1, vs_TEXCOORD1.xy);
    86.     u_xlatb13 = u_xlat1.z<-100.0;
    87.     u_xlatb26 = u_xlat10_2.w==0.0;
    88.     u_xlatb13 = u_xlatb26 || u_xlatb13;
    89.     if(!u_xlatb13){
    90.         u_xlat13.xy = vs_TEXCOORD1.xy * _MainTex_TexelSize.zw;
    91.         u_xlat13.xy = u_xlat13.xy * _ProjInfo.xy + _ProjInfo.zw;
    92.         u_xlat1.xy = u_xlat1.zz * u_xlat13.xy;
    93.         u_xlat10_2 = texture(_CameraGBufferTexture2, vs_TEXCOORD1.xy);
    94.         u_xlat16_13.xyz = u_xlat10_2.xyz * vec3(2.0, 2.0, 2.0) + vec3(-1.0, -1.0, -1.0);
    95.         u_xlat2.xyz = u_xlat16_13.yyy * hlslcc_mtx4x4_WorldToCameraMatrix[1].xyz;
    96.         u_xlat2.xyz = hlslcc_mtx4x4_WorldToCameraMatrix[0].xyz * u_xlat16_13.xxx + u_xlat2.xyz;
    97.         u_xlat13.xyz = hlslcc_mtx4x4_WorldToCameraMatrix[2].xyz * u_xlat16_13.zzz + u_xlat2.xyz;
    98.         u_xlat40 = dot(u_xlat1.xyz, u_xlat1.xyz);
    99.         u_xlat40 = inversesqrt(u_xlat40);
    100.         u_xlat2.xyz = vec3(u_xlat40) * u_xlat1.xyz;
    101.         u_xlat40 = dot(u_xlat13.xyz, (-u_xlat2.xyz));
    102.         u_xlat40 = u_xlat40 + u_xlat40;
    103.         u_xlat3.xyz = u_xlat13.xyz * vec3(u_xlat40) + u_xlat2.xyz;
    104.         u_xlat40 = dot(u_xlat3.xyz, u_xlat3.xyz);
    105.         u_xlat40 = inversesqrt(u_xlat40);
    106.         u_xlat3.xyz = vec3(u_xlat40) * u_xlat3.xyz;
    107.         u_xlatb40 = _AllowBackwardsRays==0;
    108.         u_xlatb41 = 0.0<u_xlat3.z;
    109.         u_xlatb40 = u_xlatb40 && u_xlatb41;
    110.         if(!u_xlatb40){
    111.             u_xlat0.x = u_xlat0.x * 0.00999999978;
    112.             u_xlat0.x = max(u_xlat0.x, 0.00100000005);
    113.             u_xlat0.xyz = u_xlat13.xyz * u_xlat0.xxx + u_xlat1.xyz;
    114.             u_xlatb39 = _TraceBehindObjects==1;
    115.             u_xlat4.xy = vec2(1.0, 1.0) / _ScreenSize.xy;
    116.             u_xlat40 = u_xlat3.z * _MaxRayTraceDistance + u_xlat0.z;
    117.             u_xlatb40 = -0.00999999978<u_xlat40;
    118.             u_xlat41 = (-u_xlat0.z) + -0.00999999978;
    119.             u_xlat41 = u_xlat41 / u_xlat3.z;
    120.             u_xlat40 = (u_xlatb40) ? u_xlat41 : _MaxRayTraceDistance;
    121.             u_xlat5.xyz = u_xlat3.xyz * vec3(u_xlat40) + u_xlat0.xyz;
    122.             u_xlat6.xyz = u_xlat0.yyy * hlslcc_mtx4x4_ProjectToPixelMatrix[1].xyw;
    123.             u_xlat6.xyz = hlslcc_mtx4x4_ProjectToPixelMatrix[0].xyw * u_xlat0.xxx + u_xlat6.xyz;
    124.             u_xlat6.xyz = hlslcc_mtx4x4_ProjectToPixelMatrix[2].xyw * u_xlat0.zzz + u_xlat6.xyz;
    125.             u_xlat6.xyz = u_xlat6.xyz + hlslcc_mtx4x4_ProjectToPixelMatrix[3].xyw;
    126.             u_xlat7.xyz = u_xlat5.yyy * hlslcc_mtx4x4_ProjectToPixelMatrix[1].xyw;
    127.             u_xlat7.xyz = hlslcc_mtx4x4_ProjectToPixelMatrix[0].xyw * u_xlat5.xxx + u_xlat7.xyz;
    128.             u_xlat7.xyz = hlslcc_mtx4x4_ProjectToPixelMatrix[2].xyw * u_xlat5.zzz + u_xlat7.xyz;
    129.             u_xlat7.xyz = u_xlat7.xyz + hlslcc_mtx4x4_ProjectToPixelMatrix[3].xyw;
    130.             u_xlat40 = float(1.0) / u_xlat6.z;
    131.             u_xlat41 = float(1.0) / u_xlat7.z;
    132.             u_xlat30.xy = vec2(u_xlat40) * u_xlat6.yx;
    133.             u_xlat32.xy = vec2(u_xlat41) * u_xlat7.xy;
    134.             u_xlat8.xyz = u_xlat0.xyz * vec3(u_xlat40);
    135.             u_xlat5.xyz = vec3(u_xlat41) * u_xlat5.xyz;
    136.             u_xlat33.xy = _ScreenSize.yx + vec2(-0.5, -0.5);
    137.             u_xlatb9.xy = lessThan(u_xlat33.xyxx, u_xlat32.yxyy).xy;
    138.             u_xlatb35.xy = lessThan(u_xlat32.yxyx, vec4(0.5, 0.5, 0.5, 0.5)).xy;
    139.             u_xlatb35.x = u_xlatb35.x || u_xlatb9.x;
    140.             u_xlatb35.y = u_xlatb35.y || u_xlatb9.y;
    141.             u_xlatb35.z = u_xlatb35.x || u_xlatb9.x;
    142.             u_xlatb35.w = u_xlatb35.y || u_xlatb9.y;
    143.             u_xlat33.x = (u_xlatb9.x) ? (-u_xlat33.x) : float(-0.5);
    144.             u_xlat33.y = (u_xlatb9.y) ? (-u_xlat33.y) : float(-0.5);
    145.             u_xlat33.xy = u_xlat7.yx * vec2(u_xlat41) + u_xlat33.xy;
    146.             u_xlat7.xy = u_xlat7.yx * vec2(u_xlat41) + (-u_xlat30.xy);
    147.             u_xlat7.xy = u_xlat33.xy / u_xlat7.xy;
    148.             u_xlat42 = u_xlatb35.x ? u_xlat7.x : float(0.0);
    149.             u_xlat44 = max(u_xlat7.y, u_xlat42);
    150.             u_xlat42 = (u_xlatb35.y) ? u_xlat44 : u_xlat42;
    151.             u_xlat7.xy = u_xlat6.xy * vec2(u_xlat40) + (-u_xlat32.xy);
    152.             u_xlat32.xy = vec2(u_xlat42) * u_xlat7.xy + u_xlat32.xy;
    153.             u_xlat44 = u_xlat40 + (-u_xlat41);
    154.             u_xlat41 = u_xlat42 * u_xlat44 + u_xlat41;
    155.             u_xlat7.xyz = u_xlat0.xyz * vec3(u_xlat40) + (-u_xlat5.xyz);
    156.             u_xlat5.xyz = vec3(u_xlat42) * u_xlat7.xyz + u_xlat5.xyz;
    157.             u_xlat7.xy = u_xlat6.xy * vec2(u_xlat40) + (-u_xlat32.xy);
    158.             u_xlat42 = dot(u_xlat7.xy, u_xlat7.xy);
    159.             u_xlatb42 = u_xlat42<9.99999975e-005;
    160.             u_xlat7.xy = u_xlat6.xy * vec2(u_xlat40) + vec2(0.00999999978, 0.00999999978);
    161.             u_xlat7.xy = (bool(u_xlatb42)) ? u_xlat7.xy : u_xlat32.xy;
    162.             u_xlat7.zw = (-u_xlat6.xy) * vec2(u_xlat40) + u_xlat7.xy;
    163.             u_xlatb42 = abs(u_xlat7.z)<abs(u_xlat7.w);
    164.             u_xlat30.xy = (bool(u_xlatb42)) ? u_xlat30.xy : u_xlat30.yx;
    165.             u_xlat6.xyz = (bool(u_xlatb42)) ? u_xlat7.ywz : u_xlat7.xzw;
    166.             u_xlati44 = int((0.0<u_xlat6.y) ? 0xFFFFFFFFu : uint(0u));
    167.             u_xlati45 = int((u_xlat6.y<0.0) ? 0xFFFFFFFFu : uint(0u));
    168.             u_xlati44 = (-u_xlati44) + u_xlati45;
    169.             u_xlat7.x = float(u_xlati44);
    170.             u_xlat44 = u_xlat7.x / u_xlat6.y;
    171.             u_xlat7.y = u_xlat6.z * u_xlat44;
    172.             u_xlat5.xyz = (-u_xlat0.xyz) * vec3(u_xlat40) + u_xlat5.xyz;
    173.             u_xlat5.xyz = vec3(u_xlat44) * u_xlat5.xyz;
    174.             u_xlat0.x = (-u_xlat40) + u_xlat41;
    175.             u_xlat0.x = u_xlat44 * u_xlat0.x;
    176.             u_xlat13.x = trunc(_RayStepSize);
    177.             u_xlat5.xyw = u_xlat13.xxx * u_xlat5.xyz;
    178.             u_xlat41 = u_xlat13.x * u_xlat0.x;
    179.             u_xlat6.x = u_xlat6.x * u_xlat7.x;
    180.             u_xlat19 = (-_LayerThickness) + 100000.0;
    181.             u_xlatb19 = u_xlat0.z>=u_xlat19;
    182.             u_xlatb32 = 100000.0>=u_xlat0.z;
    183.             u_xlatb19 = u_xlatb32 && u_xlatb19;
    184.             u_xlat9 = u_xlat8.z;
    185.             u_xlat22 = u_xlat40;
    186.             u_xlat32.x = float(-1.0);
    187.             u_xlat32.y = float(-1.0);
    188.             u_xlat10.xy = u_xlat30.xy;
    189.             u_xlati33 = 0;
    190.             u_xlati46 = int(u_xlatb19);
    191.             u_xlat11.y = u_xlat0.z;
    192.             u_xlati47 = int(u_xlatb19);
    193.             while(true){
    194.                 u_xlat35.x = u_xlat7.x * u_xlat10.x;
    195.                 u_xlatb35.x = u_xlat6.x>=u_xlat35.x;
    196.                 u_xlatb48 = u_xlati33<_MaxSteps;
    197.                 u_xlatb35.x = u_xlatb48 && u_xlatb35.x;
    198.                 u_xlati48 = ~u_xlati47;
    199.                 u_xlati35 = u_xlatb35.x ? u_xlati48 : int(0);
    200.                 if(u_xlati35 == 0) {break;}
    201.                 u_xlat35.x = u_xlat5.w * 0.5 + u_xlat9;
    202.                 u_xlat48 = u_xlat41 * 0.5 + u_xlat22;
    203.                 u_xlat11.x = u_xlat35.x / u_xlat48;
    204.                 u_xlatb35.x = u_xlat11.x<u_xlat11.y;
    205.                 u_xlat35.xy = (u_xlatb35.x) ? u_xlat11.xy : u_xlat11.yx;
    206.                 u_xlat32.xy = (bool(u_xlatb42)) ? u_xlat10.yx : u_xlat10.xy;
    207.                 u_xlat36.xy = u_xlat4.xy * u_xlat32.xy;
    208.                 u_xlat10_12 = textureLod(_CameraDepthTexture, u_xlat36.xy, 0.0);
    209.                 u_xlat36.x = _ZBufferParams.z * u_xlat10_12.x + _ZBufferParams.w;
    210.                 u_xlat36.x = float(1.0) / u_xlat36.x;
    211.                 u_xlati35 = int(((-u_xlat36.x)>=u_xlat35.x) ? 0xFFFFFFFFu : uint(0u));
    212.                 u_xlat36.x = (-u_xlat36.x) + (-_LayerThickness);
    213.                 u_xlatb48 = u_xlat35.y>=u_xlat36.x;
    214.                 u_xlati46 = u_xlatb48 ? u_xlati35 : int(0);
    215.                 u_xlati47 = (u_xlatb39) ? u_xlati46 : u_xlati35;
    216.                 u_xlat10.xy = u_xlat7.xy * u_xlat13.xx + u_xlat10.xy;
    217.                 u_xlat9 = u_xlat5.z * u_xlat13.x + u_xlat9;
    218.                 u_xlat22 = u_xlat0.x * u_xlat13.x + u_xlat22;
    219.                 u_xlati33 = u_xlati33 + 1;
    220.                 u_xlat11.y = u_xlat11.x;
    221.             }
    222.             u_xlat4.z = (-u_xlat5.z) * u_xlat13.x + u_xlat9;
    223.             u_xlat0.x = (-u_xlat0.x) * u_xlat13.x + u_xlat22;
    224.             u_xlat13.x = float(u_xlati33);
    225.             u_xlat4.xy = u_xlat5.xy * u_xlat13.xx + u_xlat8.xy;
    226.             u_xlat0.x = float(1.0) / u_xlat0.x;
    227.             u_xlat5.xy = u_xlat32.xy / _ScreenSize.xy;
    228.             u_xlat0.xzw = u_xlat4.xyz * u_xlat0.xxx + (-u_xlat1.xyz);
    229.             u_xlat5.z = dot(u_xlat0.xzw, u_xlat3.xyz);
    230.             if(u_xlati46 != 0) {
    231.                 u_xlat0.x = u_xlat13.x + u_xlat13.x;
    232.                 u_xlat13.x = float(_MaxSteps);
    233.                 u_xlat0.x = u_xlat0.x / u_xlat13.x;
    234.                 u_xlat0.x = u_xlat0.x + -1.0;
    235.                 u_xlat0.x = max(u_xlat0.x, 0.0);
    236.                 u_xlat0.x = (-u_xlat0.x) + 1.0;
    237.                 u_xlat0.x = u_xlat0.x * u_xlat0.x;
    238.                 u_xlat13.x = (-u_xlat5.z) + _MaxRayTraceDistance;
    239.                 u_xlat13.x = u_xlat13.x / _FadeDistance;
    240.                 u_xlat13.x = clamp(u_xlat13.x, 0.0, 1.0);
    241.                 u_xlat0.x = u_xlat13.x * u_xlat0.x;
    242.                 u_xlat13.x = dot(u_xlat3.xyz, u_xlat2.xyz);
    243.                 u_xlat13.x = log2(abs(u_xlat13.x));
    244.                 u_xlat13.x = u_xlat13.x * _FresnelFadePower;
    245.                 u_xlat13.x = exp2(u_xlat13.x);
    246.                 u_xlat26 = (-_FresnelFade) + 1.0;
    247.                 u_xlat39 = (-u_xlat13.x) + 1.0;
    248.                 u_xlat13.x = u_xlat26 * u_xlat39 + u_xlat13.x;
    249.                 u_xlat13.x = max(u_xlat13.x, 0.0);
    250.                 u_xlat0.x = u_xlat13.x * u_xlat0.x;
    251.                 u_xlatb13 = 0<_TreatBackfaceHitAsMiss;
    252.                 if(u_xlatb13){
    253.                     u_xlat10_1 = textureLod(_CameraGBufferTexture2, u_xlat5.xy, 0.0);
    254.                     u_xlat16_13.xyz = u_xlat10_1.xyz * vec3(2.0, 2.0, 2.0) + vec3(-1.0, -1.0, -1.0);
    255.                     u_xlat1.xyz = u_xlat3.yyy * hlslcc_mtx4x4_CameraToWorldMatrix[1].xyz;
    256.                     u_xlat1.xyz = hlslcc_mtx4x4_CameraToWorldMatrix[0].xyz * u_xlat3.xxx + u_xlat1.xyz;
    257.                     u_xlat1.xyz = hlslcc_mtx4x4_CameraToWorldMatrix[2].xyz * u_xlat3.zzz + u_xlat1.xyz;
    258.                     u_xlat13.x = dot(u_xlat16_13.xyz, u_xlat1.xyz);
    259.                     u_xlatb13 = 0.0<u_xlat13.x;
    260.                     u_xlat0.x = (u_xlatb13) ? 0.0 : u_xlat0.x;
    261.                 //ENDIF
    262.                 }
    263.             } else {
    264.                 u_xlat0.x = 0.0;
    265.             //ENDIF
    266.             }
    267.             u_xlat13.xy = (-u_xlat5.xy) + vec2(1.0, 1.0);
    268.             u_xlat13.x = min(u_xlat13.y, u_xlat13.x);
    269.             u_xlat26 = min(u_xlat5.x, u_xlat5.x);
    270.             u_xlat13.x = min(u_xlat26, u_xlat13.x);
    271.             u_xlat26 = _ScreenEdgeFading * 0.100000001 + 0.00100000005;
    272.             u_xlat13.x = u_xlat13.x / u_xlat26;
    273.             u_xlat13.x = clamp(u_xlat13.x, 0.0, 1.0);
    274.             u_xlat13.x = log2(u_xlat13.x);
    275.             u_xlat13.x = u_xlat13.x * 0.200000003;
    276.             u_xlat13.x = exp2(u_xlat13.x);
    277.             u_xlat13.x = u_xlat13.x * u_xlat13.x;
    278.             SV_Target0.w = u_xlat0.x * u_xlat13.x;
    279.             SV_Target0.xyz = u_xlat5.xyz;
    280.         } else {
    281.             SV_Target0 = vec4(0.0, 0.0, 0.0, 0.0);
    282.         //ENDIF
    283.         }
    284.     } else {
    285.         SV_Target0 = vec4(0.0, 0.0, 0.0, 0.0);
    286.     //ENDIF
    287.     }
    288.     return;
    289. }
    290. -------- failed compiling:
    291. fragment evaluation shader
    292. ERROR: 0:140: Swizzle component 'z' indexes beyond end of input vector (length 2)
    293. ERROR: 0:141: Swizzle component 'w' indexes beyond end of input vector (length 2)
    294.  
    295. Note: Creation of internal variant of shader 'Hidden/Post FX/Screen Space Reflection' failed.
    296. WARNING: Shader Unsupported: 'Hidden/Post FX/Screen Space Reflection' - Pass '' has no vertex shader
    297. Invalid pass number (6) for Graphics.Blit (Material "(Unknown material)" with 6 passes)
    298.  
    299. (Filename:  Line: 678)
    300.  
    301. Invalid pass number (8) for Graphics.Blit (Material "(Unknown material)" with 6 passes)
    302.  
    303. (Filename:  Line: 678)
    304.  
    305. WARNING: Shader Unsupported: 'Hidden/Post FX/Depth Of Field' - Pass 'COC TEMPORAL FILTER' has no vertex shader
    306.  
    Followed by lots of

    Code (csharp):
    1.  
    2. (Filename:  Line: 678)
    3.  
    4. Invalid pass number (8) for Graphics.Blit (Material "(Unknown material)" with 6 passes)
    5.  
     
  2. c_petersen

    c_petersen

    Joined:
    Feb 3, 2017
    Posts:
    2
    Hey, I hope this is the right thread for this question/problem. I know that the objects in my scene are pretty big, but the ScreenSpaceReflection (SSR) image-effect just stops after a few meters. Because of several reasons I can't scale my scenery down anymore (it would be way too much work to do).

    As you can see there is basically just a hard cut visible and it's not rendering any reflections after this. Changing some settings won't fix this and I already tried to change some shader code without any success. How can I increase the range of the SSR image-effect? (by changing some lines) I literally spent two days trying to fix this, so I would be really happy if somebody could help me :)
     
  3. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    I would like to know this as well, because in my game the closest thing to the camera is further away than the max range of SSR. The post above makes it clear that it isn't an easily hackable fix (at least without someone pointing us at the right place in code). Is there a chance this limit gets lifted, and if not, what's the explanation? Sadly I don't know much about how SSR works, but I always thought "depthbuffer value" on a screenspace effect shouldn't matter that much for performance. Or is there a relation between distance to camera and number of pixels that need to be checked, that I'm not seeing?
     
  4. Coredumping

    Coredumping

    Joined:
    Dec 17, 2014
    Posts:
    51
    AFrisby likes this.
  5. Jesus

    Jesus

    Joined:
    Jul 12, 2010
    Posts:
    502
    As a technical reason, no there's nothing wrong with using screenspace effects at any scale.

    However, in 99% of cases, it's designed as a simple and easy way to do things like contact reflections. Like how SSAO is supposed to work in corners of a room (or whatever) SSR isn't generally supposed to handle reflecting anything too big. The accepted workflow for reflecting those things is to use reflection probes or planar reflection camera, etc.

    The limit was probably put there because Unity either didn't think anyone would step outside the boundary that far, or they didn't want people to do so.
     
  6. pechaut

    pechaut

    Joined:
    Apr 24, 2017
    Posts:
    14
    Hi,

    I need to use a custom post effect, and have built a simple shader (let's call it S) that only does:

    half4 col = tex2D(_MainTex, UnityStereoScreenSpaceUVAdjust(i.uv, _MainTex_ST));
    return col;

    and a CSharp file, that does a simple blit.

    Alone, it works fine !

    If after that shader I use a PostEffect component, I see terrible bandings in the lightmaps.
    If I invert the order of the shaders, same thing.

    Any idea on what can cause this terrible banding ?
     
  7. jsfledd

    jsfledd

    Joined:
    Mar 14, 2013
    Posts:
    3
    I've been using the Post Processing Stack on OSX and Unity 5.6.0 for a few days. I switched over to Windows 10 / Unity 5.6.1 and the Post Processing Stack breaks. I'm getting 17 errors:

    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(204,13): error CS1502: The best overloaded method match for `UnityEditor.PostProcessing.ColorGradingModelEditor.DoGUIFor(string, Action)' has some invalid arguments
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(215,14): (Location of the symbol related to previous error)
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(204,37): error CS1503: Argument `#2' cannot convert `method group' expression to type `Action'
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(206,13): error CS1502: The best overloaded method match for `UnityEditor.PostProcessing.ColorGradingModelEditor.DoGUIFor(string, Action)' has some invalid arguments
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(215,14): (Location of the symbol related to previous error)
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(206,31): error CS1503: Argument `#2' cannot convert `method group' expression to type `Action'
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(208,13): error CS1502: The best overloaded method match for `UnityEditor.PostProcessing.ColorGradingModelEditor.DoGUIFor(string, Action)' has some invalid arguments
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(215,14): (Location of the symbol related to previous error)
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(208,39): error CS1503: Argument `#2' cannot convert `method group' expression to type `Action'
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(210,13): error CS1502: The best overloaded method match for `UnityEditor.PostProcessing.ColorGradingModelEditor.DoGUIFor(string, Action)' has some invalid arguments
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(215,14): (Location of the symbol related to previous error)
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(210,36): error CS1503: Argument `#2' cannot convert `method group' expression to type `Action'
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(212,13): error CS1502: The best overloaded method match for `UnityEditor.PostProcessing.ColorGradingModelEditor.DoGUIFor(string, Action)' has some invalid arguments
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(215,14): (Location of the symbol related to previous error)
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(212,40): error CS1503: Argument `#2' cannot convert `method group' expression to type `Action'
    Assets/PostProcessing/Editor/Models/ColorGradingModelEditor.cs(219,13): error CS0119: Expression denotes a `variable', where a `method group' was expected
    Assets/PostProcessing/Editor/PostProcessingModelEditor.cs(39,35): error CS1502: The best overloaded method match for `UnityEditor.PostProcessing.EditorGUIHelper.Header(string, UnityEditor.SerializedProperty, Action)' has some invalid arguments
    Assets/PostProcessing/Editor/Utils/EditorGUIHelper.cs(44,28): (Location of the symbol related to previous error)
    Assets/PostProcessing/Editor/PostProcessingModelEditor.cs(39,94): error CS1503: Argument `#3' cannot convert `method group' expression to type `Action'
    Assets/PostProcessing/Editor/PostProcessingModelEditor.cs(40,35): error CS1502: The best overloaded method match for `UnityEditor.PostProcessing.EditorGUIHelper.Header(string, UnityEditor.SerializedProperty, UnityEditor.SerializedProperty, Action)' has some invalid arguments
    Assets/PostProcessing/Editor/Utils/EditorGUIHelper.cs(90,28): (Location of the symbol related to previous error)
    Assets/PostProcessing/Editor/PostProcessingModelEditor.cs(40,113): error CS1503: Argument `#4' cannot convert `method group' expression to type `Action'
    Assets/PostProcessing/Editor/Utils/EditorGUIHelper.cs(65,69): error CS0119: Expression denotes a `variable', where a `method group' was expected
    Assets/PostProcessing/Editor/Utils/EditorGUIHelper.cs(138,69): error CS0119: Expression denotes a `variable', where a `method group' was expected
     
  8. ZeBraNS

    ZeBraNS

    Joined:
    Feb 21, 2015
    Posts:
    40
    Hi,

    I don't know was this mentioned before but is it possible to animate values in post processing stack and how?
    I want to change values of depth of field during gameplay.
     
  9. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    It's being rewritten.
     
  10. c_petersen

    c_petersen

    Joined:
    Feb 3, 2017
    Posts:
    2
    That's really good to know, because I thought that it already has been rewritten.:) In one of the last versions I actually could change some code to increase the range which isn't possible right now.
     
  11. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    it's been through couple of iteration afaik
     
  12. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    V2 on github is where things are at the bleeding edge.
     
  13. JohnSmith1915

    JohnSmith1915

    Joined:
    Apr 21, 2016
    Posts:
    143
    is sad a V2 without issues report, i try many times use it but ever fail.
     
  14. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    I am trying to test v2 on 5.6.1f1, but couldn't make it work.

     
  15. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    put the volume into another object with specific layer, add the PPLayer into the camera
     
  16. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142




    No success. Am I missing a tutorial?
     
  17. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    the volume "Layer"
     
  18. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
    Thank you, now I can make the effects work. Except for Color Grading.

    I turned my game's Color Space to Linear. Camera has Allow HDR. Choosing LDR mode makes everything look strange. HDR looks okay, but it looks same no matter what other settings (like contrast, tint) I change.

    I must note that I used to use Gamma as color space and I could use ACES with satisfying results in v1.
     
    Last edited: May 26, 2017
  19. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    yeah i can't get a good grading in gamma too
     
  20. primaerfunktion

    primaerfunktion

    Joined:
    Jan 16, 2012
    Posts:
    98
    Hey everyone! Upon importing the package into my project, I'm greeted with a couple of errors. I tried redownloading / reimporting with the same issue. Strangely the problem does not happen in a new / different project. Just in this one. I also copied to folder from the project where it works straight over to the project where the errors happen. With the same result. It's quite stange. I'm Running Unity 5.6.1f1. Any ideas on what's going on?
     

    Attached Files:

    • type.JPG
      type.JPG
      File size:
      120.8 KB
      Views:
      1,014
  21. JohnSmith1915

    JohnSmith1915

    Joined:
    Apr 21, 2016
    Posts:
    143
    any tutorial or guide to use V2, and where is the AO in this version? thanks.
     
    Last edited: May 28, 2017
  22. AW_Arts

    AW_Arts

    Joined:
    Feb 12, 2017
    Posts:
    5
    Hi there, does anyone know how to fix this error. Thanks
    upload_2017-5-30_11-15-29.png
     
  23. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Can someone explain the Fog setting? It says it's only available in Deferred rendering and you need to use the old Fog settings in the Lighting panel. Plus it says in the lighting panel that fog does not affect opaque objects in deferred rendering. Doesn't this all make this pretty useless?
     
  24. Johannski

    Johannski

    Joined:
    Jan 25, 2014
    Posts:
    826
    hippocoder likes this.
  25. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    @Chman @Tim-C What would be able to cause motion vectors to be drawn incorrectly at longer camera distances? Close up they seem fine, when I zoom out they look in the debug view like they no longer do a zTest and blend differently. A moving object obscured by a stationary object still draws to the motion vector buffer (at greater camera distances). That might explain the reason for many of the motion artifacts related to TAA. Is this a known issue or even fixed already in v2?
     
    Last edited: May 31, 2017
  26. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    507
    Bump, please someone answer.
     
  27. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    There is a contrast slider in the version of the stack that I'm using (got it from the assetstore, fairly recently). Does that not do what you want?
     
    Crossway likes this.
  28. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    507
    Thanks, but there was a contrast gain too with old version of cinematic effects that was really useful for me. But now it's removed on this new post processing stack.
     
  29. dilmerval

    dilmerval

    Joined:
    Jun 15, 2013
    Posts:
    232
    Guys first of all thank you for this awesome package, I am currently using it in MAC OSX and also in iOS successfully.

    But now I am having a problem when porting my game to tvOS. If I use the pipepline with Bloom, Ambient Occlusion, or Vignette enabled it crashes the game. I also try disabling every effect and is still crashing with this error:

    Setting up 1 worker threads for Enlighten.
    Thread -> id: 16f413000 -> priority: 1
    2017-06-04 18:10:55.185190-0600 cubiques[2606:565417] Execution of the command buffer was aborted due to an error during execution. Caused GPU Hang Error (IOAF code 3)
    2017-06-04 18:10:55.252497-0600 cubiques[2606:565417] Execution of the command buffer was aborted due to an error during execution. Caused GPU Hang Error (IOAF code 3)
    2017-06-04 18:10:55.315863-0600 cubiques[2606:565418] Execution of the command buffer was aborted due to an error during execution. Caused GPU Hang Error (IOAF code 3)
    2017-06-04 18:10:55.364236-0600 cubiques[2606:565417] Execution of the command buffer was aborted due to an error during execution. Caused GPU Hang Error (IOAF code 3)
    2017-06-04 18:10:55.419083-0600 cubiques[2606:565417] Execution of the command buffer was aborted due to an error during execution. Caused GPU Hang Error (IOAF code 3)
    2017-06-04 18:10:55.431497-0600 cubiques[2606:565295] GC startmotion updates
    <CFNumber 0xb000000000000012 [0x1a3d51818]>{value = +1, type = kCFNumberSInt32Type}


    Any ideas?
     
  30. Ga2Z

    Ga2Z

    Joined:
    Feb 16, 2012
    Posts:
    68
    Sorry I haven't read all the thread and this question might have been answered before...

    But, what is the pipeline if I'd like to use a different image effact for something like AO or if I want to use Amplify Color for grading and the stack too?
     
  31. xrooshka

    xrooshka

    Joined:
    Mar 5, 2014
    Posts:
    59
    No special pipeline actually for now. As there is no way to include an external image effects in the stack, you may just insert your additional effects before or after the stack in component list on camera. I think AO must be before and color grading after the stack. But you can experiment with it.
     
    Ga2Z likes this.
  32. Play_Edu

    Play_Edu

    Joined:
    Jun 10, 2012
    Posts:
    722
    Great stuff. Waiting fore fog effect.
     
  33. Tzan

    Tzan

    Joined:
    Apr 5, 2009
    Posts:
    736

    I just downloaded it from Asset Store ver 1.0.2
    I'm using 5.5.2f1
    I get the same 17 error messages.

    It just looks like someone was trying to be an extra fancy programmer when it wasnt really required :)
     
  34. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    @Chman is the TAA in v2 are implemented in V1?
     
    arnoob likes this.
  35. PMerlaud

    PMerlaud

    Joined:
    Apr 9, 2013
    Posts:
    64
    Is the Screen Space Reflection supposed to work on mobile? I can see it fine in the editor but when I'm running the app on my device there's no reflection at all.

    I'm using :
    - Unity 5.5.0p4
    - iPad Pro 9.7" (iOS 10.3.1)
     
  36. Dvonio

    Dvonio

    Joined:
    Oct 15, 2013
    Posts:
    20
    Hello, I'm trying to use the offset values in a shader of a model that is close to the camera, so it is seen in front of other objects, the thing (I guess) is that TAA motion vectors are not being updated properly and when I move the TAA leaves ghosty trails everyframe (unusable)

    Does anyone of you have any solution? will be much appreciated thank you!
     
    arnoob likes this.
  37. Gord10

    Gord10

    Joined:
    Mar 27, 2013
    Posts:
    142
  38. Stephanides

    Stephanides

    Joined:
    Oct 5, 2014
    Posts:
    12
    Hello, i want to ask .. how can i change postExposure in runtime in C#? im trying to change property Exposure in ubermaterial but it doesnt work.. can give me somebody example how to do this ?
    Thanks a lot
     
  39. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    I'm using two cameras. One camera is standard camera for everything except UI and another one is for UI (mixed 3d and 2d elements). The second camera has higher depth value than the first one and is set to depth only so it renders the UI over everything else.

    I would like to use camera effects for both of them but when some effects like AA or Color Grading are enabled on the second camera it applies them to the whole screen. If effect I'm getting same effects applied more than once as they affect 'pixels' that are already affected by effects attached to the first camera.

    Is it possible to apply the effects from the second camera only to objects that are rendered by this camera?

    I know that I can disable effects like AA or Color Grading on the first camera and use them only on the second one but I need to use different settings of these effects for both cameras.

    The question is not only about the post-processing stack. I'm wondering if it's possible at all, even with single effects. Anyway I'm posting here as I would prefer to use the official post-processing stack for all cameras if it's possible.

    Any help will be much appreciated.
     
  40. mackot

    mackot

    Joined:
    Mar 23, 2016
    Posts:
    14
    Is post processing stack attached to camera which output in Render Texture not working?
     
  41. Lex4art

    Lex4art

    Joined:
    Nov 17, 2012
    Posts:
    445
    Working fine for me...
     
    Martin_H likes this.
  42. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    It should work.

    It's not really possible by default. At least not in a convenient and practical way. What I do is render the UI, which has its own post stack and camera to a rendertexture, and then blend that additively onto the main camera. I have had to put some darkened areas as a separate UI canvas on the main camera to make that work, so that the additive blending always stays readable and looks ok. But honestly it's a bad solution and the performance hit of having two post stacks seems considerable, at least in the editor. I'm considering if I can somehow make it work with one cam and post stack or get rid of the ingame UI entirely, or render the UI without post onto a rendertexture and use that as a texture on a mesh in the view of the main cam, with a zWrite enabled shader to prevent things like motion blur and TAA being applied incorrectly to the UI.
     
    sqallpl likes this.
  43. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    Hello, I get 2 compile errors after installing this on 5.6.1p3:

    PostProcessingBehavior.cs(291,34):
    errors CS0122: "UnityEngine.PostProcessingPrifle.MonitorSettings.onFrameEndEditorOnly' is inaccessible due to it's protection level.

    error CS1955: The Member UnityEngine.PostProcessingPrifle.MonitorSettings.onFrameEndEditorOnly canot be used as method or delegate.

    Dev, can you check this? thanks.
     
  44. TeohRIK

    TeohRIK

    Joined:
    Jan 22, 2014
    Posts:
    106
    Having some artifact with the SSR, any clue for this?
     

    Attached Files:

  45. LaireonGames

    LaireonGames

    Joined:
    Nov 16, 2013
    Posts:
    705
    Does anyone have any ideas on how to control the distance affected by Ambient Occlusion? I have found when you have a huge draw distance that AO just stops working. I have tried looking into the .cginc but adding in *2 to where I would expect doesn't seem to make any differences :/
     
  46. Epic_Cube

    Epic_Cube

    Joined:
    Jul 3, 2012
    Posts:
    100
    Hi,
    I'm trying to use post processing stack in my GearVR app.
    I need for Antialiasing, Bloom, Color Grading and Vignette. When I run the app, no post effect is done at all.
    Any particular setting needed? Is Post processing Stack supported for this Platform?

    NOTE: When I build my app, some errors appear in Screen Space Reflection effect, but I actually don't use it, so I've set some shader function to always return 0.

    thx in advance
     
  47. sqallpl

    sqallpl

    Joined:
    Oct 22, 2013
    Posts:
    384
    Thanks for the reply. At the moment I'm experimenting with using forward for UI camera (it uses orthographic perspective anyway, so it only works in forward) and MSAA. In effect I have AA for UI elements that is not related to AA on the main camera and (as far as I know and can see) is not affecting the main camera (which uses deferred). I don't know if this is a good solution. It still has some limitations and additional performance hit.
     
    Last edited: Jun 20, 2017
  48. JakubSmaga

    JakubSmaga

    Joined:
    Aug 5, 2015
    Posts:
    417
  49. hopoo

    hopoo

    Joined:
    Jul 26, 2016
    Posts:
    4
    Adding new basic post-processes seems to break the entire stack (turns off entirely or breaks). What are ways we can add post processes on top of the current stack?
     
  50. p-seba

    p-seba

    Joined:
    Jul 9, 2015
    Posts:
    6
    I had same error. It was because I already had script with class named Action which overrided Unity's Action class
     
    Last edited: Jun 30, 2017
    Tzan likes this.