Skip to content

Jimmar/Unity-Transition-Effect-Shader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Unity Transition Effect Shader

A shader to create cool transition effects in unity.

I wrote this shader to mimic what Dan did in his youtube video.

The shader was rewritten to add a way to use textures as a transition image instead of just a color while preserving the ability to use any transition color.

Demo

You can make cool things like

alt text using alt text

or if you used a noisier texture, you can create

alt text

but why stop there ? you can use images like this the ones from this pack and end up with something like

alt text

(Color is modifiable too)

and lastly you can use another texture (or the same one) for the transition image to create something like

alt text

Using the shader

The shader is used by creating a material out of it [Right click on the shader in Unity and then create a new material] and using that material in a C# MonoBehaviour.

The C# script should have a Graphics.Blit inside the OnRenderImage()

public Material mat;

void OnRenderImage (RenderTexture source, RenderTexture destination){
	Graphics.Blit(source,destination,mat);
}

Attach the script to the camera and go into play mode. You can get the effect by adjusting the slider in the material.

To access the the slider from code you can call:

mat.SetFloat("_Cutoff",newValue);

before Graphics.Blit

Author

Jafar Abdulrasoul @JimmarxD

About

A shader to create cool transition effects in unity

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages