Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
This question was closed Feb 22, 2017 at 06:30 PM by tanoshimi for the following reason:

Other

avatar image
0
Question by PlaguedShadow · Feb 22, 2017 at 05:01 PM · shaderpost-process-effect

Why is my Fade Post Processing effect no longer working?

I had a fade effect on my camera to fade in/out. When I was in Unity 5.5 it worked fine, but now that I upgraded to 5.6 it no longer works. Was something changed with how post processing works now? Any ideas and suggestions would be appreciated. Here is the code I am using: public class Fade : MonoBehaviour {

     [SerializeField]
     private Color _colour = Color.white;
 
     [SerializeField]
     [Range(0, 10)]
     private float _fadeSpeed;
 
     [SerializeField]
     [Range(0, 1)]
     private float _alpha;
 
     [SerializeField]
     private Material _material;
 
     private void OnRenderImage(RenderTexture source, RenderTexture destination)
     {
         _material.SetColor("_Color", _colour);
         _material.SetFloat("_Alpha", _alpha);
         Graphics.Blit(source, destination, _material);
     }
 
 }
 
 
 Shader "Post Processing/Fade" 
 {
     Properties{
         _Color("Color", Color) = (1,1,1,1)
         _MainTex("Texture", 2D) = "white" { }
     _Alpha("Alpha", Range(0,1)) = 1
     }
         SubShader{
         LOD 200
         Tags
     {
         //"Queue" = "Transparent"
         //"RenderType" = "Transparent"
     }
 
     Pass{
         Blend SrcAlpha OneMinusSrcAlpha
 
 
         CGPROGRAM
 #pragma vertex vert
 #pragma fragment frag
 
 #include "UnityCG.cginc"
 
         float4 _Color;
     sampler2D _MainTex;
     float _Alpha;
 
     struct v2f {
         float4  pos : SV_POSITION;
         float2  uv : TEXCOORD0;
     };
 
     float4 _MainTex_ST;
 
     v2f vert(appdata_base v)
     {
         v2f o;
         o.pos = mul(UNITY_MATRIX_MVP, v.vertex);
         o.uv = TRANSFORM_TEX(v.texcoord, _MainTex);
         return o;
     }
 
     half4 frag(v2f i) : COLOR
     {
         half4 texcol = tex2D(_MainTex, i.uv);
 
         texcol = half4(_Color.rgb, _Alpha);
         //texcol.rgb = dot(texcol.rgb, float3(0.3, 0.59, 0.11));
 
         return texcol;
     }
         ENDCG
 
     }
     }
         Fallback "Diffuse"
 }
Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

  • Sort: 
avatar image
0

Answer by tanoshimi · Feb 22, 2017 at 06:30 PM

Unity 5.6 is in beta. So please report any issues with it to the beta testing forum: https://forum.unity3d.com/forums/5-6-beta.125/

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Follow this Question

Answers Answers and Comments

89 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to Get Nice Thick Toon-Like Outlines On Non-Smooth Geometry? 1 Answer

Shader to ignore post processing effects 0 Answers

Why doesn't this shader work when using it with as a custom effect on the post processing stack 1 Answer

Shader works in Editor/Windows but not on Android 1 Answer

Different between tex2D and SAMPLE_TEXTURE2D (Post Processing effect) 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges