added animation package and made small changes
This commit is contained in:
146
Assets/NEW VFX TO CHECK/Shaders/_Common/IEBase.cs
Normal file
146
Assets/NEW VFX TO CHECK/Shaders/_Common/IEBase.cs
Normal file
@@ -0,0 +1,146 @@
|
||||
|
||||
// =================================
|
||||
// Namespaces.
|
||||
// =================================
|
||||
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
// =================================
|
||||
// Define namespace.
|
||||
// =================================
|
||||
|
||||
namespace MirzaBeig
|
||||
{
|
||||
|
||||
namespace Shaders
|
||||
{
|
||||
|
||||
namespace ImageEffects
|
||||
{
|
||||
|
||||
// =================================
|
||||
// Classes.
|
||||
// =================================
|
||||
|
||||
[ExecuteInEditMode]
|
||||
[System.Serializable]
|
||||
|
||||
public class IEBase : MonoBehaviour
|
||||
{
|
||||
// =================================
|
||||
// Nested classes and structures.
|
||||
// =================================
|
||||
|
||||
// ...
|
||||
|
||||
// =================================
|
||||
// Variables.
|
||||
// =================================
|
||||
|
||||
// ...
|
||||
|
||||
protected Material material
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_material)
|
||||
{
|
||||
_material = new Material(shader);
|
||||
_material.hideFlags = HideFlags.HideAndDontSave;
|
||||
}
|
||||
|
||||
return _material;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Material _material;
|
||||
protected Shader shader { get; set; }
|
||||
|
||||
// ...
|
||||
|
||||
new protected Camera camera
|
||||
{
|
||||
get
|
||||
{
|
||||
if (!_camera)
|
||||
{
|
||||
_camera = GetComponent<Camera>();
|
||||
}
|
||||
|
||||
return _camera;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Camera _camera;
|
||||
|
||||
// =================================
|
||||
// Functions.
|
||||
// =================================
|
||||
|
||||
// ...
|
||||
|
||||
void Awake()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
void OnRenderImage(RenderTexture source, RenderTexture destination)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
protected void blit(RenderTexture source, RenderTexture destination)
|
||||
{
|
||||
Graphics.Blit(source, destination, material);
|
||||
}
|
||||
|
||||
// ...
|
||||
|
||||
void OnDisable()
|
||||
{
|
||||
if (_material)
|
||||
{
|
||||
DestroyImmediate(_material);
|
||||
}
|
||||
}
|
||||
|
||||
// =================================
|
||||
// End functions.
|
||||
// =================================
|
||||
|
||||
}
|
||||
|
||||
// =================================
|
||||
// End namespace.
|
||||
// =================================
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// =================================
|
||||
// --END-- //
|
||||
// =================================
|
||||
12
Assets/NEW VFX TO CHECK/Shaders/_Common/IEBase.cs.meta
Normal file
12
Assets/NEW VFX TO CHECK/Shaders/_Common/IEBase.cs.meta
Normal file
@@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7dd1fdef793f1214d93e73961b0fee18
|
||||
timeCreated: 1437302234
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
|
||||
// =================================
|
||||
// Namespaces.
|
||||
// =================================
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
// =================================
|
||||
// Define namespace.
|
||||
// =================================
|
||||
|
||||
namespace MirzaBeig
|
||||
{
|
||||
namespace Shaders
|
||||
{
|
||||
namespace ImageEffects
|
||||
{
|
||||
[ExecuteInEditMode]
|
||||
[System.Serializable]
|
||||
|
||||
public class MirzaPostProcessing : MonoBehaviour
|
||||
{
|
||||
public Material material;
|
||||
|
||||
void OnRenderImage(RenderTexture source, RenderTexture destination)
|
||||
{
|
||||
Graphics.Blit(source, destination, material);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea1fca54d70095a40bce4033cd4046c3
|
||||
timeCreated: 1437882603
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- mat: {fileID: 2100000, guid: c7117444282a7b34480c3e5b79e2ffe0, type: 2}
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user