Add RetroSuite-3D shader components

This commit is contained in:
Sweet Tini
2020-01-30 20:59:23 -05:00
parent d2d32b8490
commit afc6c879e7
31 changed files with 856 additions and 264 deletions

View File

@@ -1,6 +1,6 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &190725481348338939
--- !u!1 &5711328081315814053
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -8,10 +8,12 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 190725481348338936}
- component: {fileID: 190725481348338938}
- component: {fileID: 190725481348338935}
- component: {fileID: 190725481348338937}
- component: {fileID: 5711328081315814049}
- component: {fileID: 5711328081315814048}
- component: {fileID: 5711328081315814051}
- component: {fileID: 5711328081315814050}
- component: {fileID: 5711328081315814079}
- component: {fileID: 5711328081315814078}
m_Layer: 0
m_Name: Camera
m_TagString: MainCamera
@@ -19,13 +21,13 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &190725481348338936
--- !u!4 &5711328081315814049
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190725481348338939}
m_GameObject: {fileID: 5711328081315814053}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
@@ -33,21 +35,21 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!81 &190725481348338938
--- !u!81 &5711328081315814048
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190725481348338939}
m_GameObject: {fileID: 5711328081315814053}
m_Enabled: 1
--- !u!20 &190725481348338935
--- !u!20 &5711328081315814051
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190725481348338939}
m_GameObject: {fileID: 5711328081315814053}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
@@ -80,17 +82,17 @@ Camera:
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!114 &190725481348338937
--- !u!114 &5711328081315814050
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 190725481348338939}
m_GameObject: {fileID: 5711328081315814053}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6a160d838ff8b4b4693ac20007e008c7, type: 3}
@@ -104,3 +106,87 @@ MonoBehaviour:
m_CropFrameX: 1
m_CropFrameY: 1
m_StretchFill: 0
--- !u!114 &5711328081315814079
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5711328081315814053}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fb98cc8cfedcc5644a7af767e0a0d81e, type: 3}
m_Name:
m_EditorClassIdentifier:
colors:
- {r: 0.48627454, g: 0.48627454, b: 0.48627454, a: 1}
- {r: 0.7372549, g: 0.7372549, b: 0.7372549, a: 1}
- {r: 0.9725491, g: 0.9725491, b: 0.9725491, a: 1}
- {r: 0.98823535, g: 0.98823535, b: 0.98823535, a: 1}
- {r: 0, g: 0, b: 0, a: 1}
- {r: 0, g: 0, b: 0.003921569, a: 1}
- {r: 0.47058827, g: 0.47058827, b: 0.47058827, a: 1}
- {r: 0.86666673, g: 0.86666673, b: 0.86666673, a: 1}
- {r: 0, g: 0, b: 0.98823535, a: 1}
- {r: 0, g: 0.47058827, b: 0.9725491, a: 1}
- {r: 0.23529413, g: 0.7372549, b: 0.98823535, a: 1}
- {r: 0.6392157, g: 0.882353, b: 0.9725491, a: 1}
- {r: 0, g: 0, b: 0.7372549, a: 1}
- {r: 0, g: 0.34509805, b: 0.9725491, a: 1}
- {r: 0.41176474, g: 0.53333336, b: 0.9725491, a: 1}
- {r: 0.72156864, g: 0.72156864, b: 0.9725491, a: 1}
- {r: 0.26666668, g: 0.15686275, b: 0.7372549, a: 1}
- {r: 0.40784317, g: 0.26666668, b: 0.98823535, a: 1}
- {r: 0.59607846, g: 0.47058827, b: 0.9725491, a: 1}
- {r: 0.8470589, g: 0.72156864, b: 0.9725491, a: 1}
- {r: 0.5803922, g: 0, b: 0.5176471, a: 1}
- {r: 0.8352942, g: 0.015686275, b: 0.79215693, a: 1}
- {r: 0.9725491, g: 0.47058827, b: 0.9725491, a: 1}
- {r: 0.9725491, g: 0.72156864, b: 0.9725491, a: 1}
- {r: 0.65882355, g: 0, b: 0.1254902, a: 1}
- {r: 0.882353, g: 0.015686275, b: 0.34901962, a: 1}
- {r: 0.9725491, g: 0.34509805, b: 0.59607846, a: 1}
- {r: 0.9725491, g: 0.6431373, b: 0.75294125, a: 1}
- {r: 0.65882355, g: 0.0627451, b: 0, a: 1}
- {r: 0.9725491, g: 0.21960786, b: 0, a: 1}
- {r: 0.9725491, g: 0.47058827, b: 0.34509805, a: 1}
- {r: 0.94117653, g: 0.81568635, b: 0.6901961, a: 1}
- {r: 0.53333336, g: 0.078431375, b: 0, a: 1}
- {r: 0.8941177, g: 0.36078432, b: 0.0627451, a: 1}
- {r: 0.98823535, g: 0.627451, b: 0.26666668, a: 1}
- {r: 0.98823535, g: 0.87843144, b: 0.65882355, a: 1}
- {r: 0.3137255, g: 0.18823531, b: 0, a: 1}
- {r: 0.6745098, g: 0.48627454, b: 0, a: 1}
- {r: 0.9725491, g: 0.72156864, b: 0, a: 1}
- {r: 0.9725491, g: 0.8470589, b: 0.47058827, a: 1}
- {r: 0, g: 0.47058827, b: 0, a: 1}
- {r: 0.015686275, g: 0.7137255, b: 0.015686275, a: 1}
- {r: 0.72156864, g: 0.9725491, b: 0.09411766, a: 1}
- {r: 0.8470589, g: 0.9725491, b: 0.47058827, a: 1}
- {r: 0, g: 0.40784317, b: 0, a: 1}
- {r: 0, g: 0.65882355, b: 0, a: 1}
- {r: 0.34509805, g: 0.8470589, b: 0.32941177, a: 1}
- {r: 0.72156864, g: 0.9725491, b: 0.72156864, a: 1}
- {r: 0, g: 0.34509805, b: 0, a: 1}
- {r: 0, g: 0.65882355, b: 0.26666668, a: 1}
- {r: 0.34509805, g: 0.9725491, b: 0.59607846, a: 1}
- {r: 0.72156864, g: 0.9725491, b: 0.8470589, a: 1}
- {r: 0, g: 0.2509804, b: 0.34509805, a: 1}
- {r: 0, g: 0.53333336, b: 0.53333336, a: 1}
- {r: 0, g: 0.909804, b: 0.8470589, a: 1}
- {r: 0, g: 0.98823535, b: 0.98823535, a: 1}
--- !u!114 &5711328081315814078
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5711328081315814053}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 56014676381a3cb418a607d72c29f23c, type: 3}
m_Name:
m_EditorClassIdentifier:
pattern: {fileID: 2800000, guid: b269ce72120fe344fba7e2418d7188dd, type: 3}
threshold: 0.3
strength: 0.3

View File

@@ -1,56 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 11145981673336645838492a2d98e247, type: 3}
m_Name: 2DRenderer
m_EditorClassIdentifier:
m_RendererFeatures: []
m_HDREmulationScale: 1
m_LightBlendStyles:
- enabled: 1
name: Default
maskTextureChannel: 0
renderTextureScale: 1
blendMode: 1
customBlendFactors:
multiplicative: 0
additive: 0
- enabled: 0
name: Blend Style 1
maskTextureChannel: 0
renderTextureScale: 1
blendMode: 1
customBlendFactors:
multiplicative: 0
additive: 0
- enabled: 0
name: Blend Style 2
maskTextureChannel: 0
renderTextureScale: 1
blendMode: 1
customBlendFactors:
multiplicative: 0
additive: 0
- enabled: 0
name: Blend Style 3
maskTextureChannel: 0
renderTextureScale: 1
blendMode: 1
customBlendFactors:
multiplicative: 0
additive: 0
m_ShapeLightShader: {fileID: 4800000, guid: d79e1c784eaf80c4585c0be7391f757a, type: 3}
m_ShapeLightVolumeShader: {fileID: 4800000, guid: 7e60080c8cd24a2468cb08b4bfee5606,
type: 3}
m_PointLightShader: {fileID: 4800000, guid: e35a31e1679aeff489e202f5cc4853d5, type: 3}
m_PointLightVolumeShader: {fileID: 4800000, guid: c7d04ca57e5449d49ad9cee1c604bc26,
type: 3}
m_BlitShader: {fileID: 4800000, guid: c17132b1f77d20942aa75f8429c0f8bc, type: 3}

View File

@@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 2852ea38b07728f458de7e0d44f1be8f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,46 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bf2edee5c58d82540a51f03df9d42094, type: 3}
m_Name: LwRenderPipelineAsset
m_EditorClassIdentifier:
k_AssetVersion: 4
m_RendererType: 0
m_RendererData: {fileID: 11400000, guid: 2852ea38b07728f458de7e0d44f1be8f, type: 2}
m_RequireDepthTexture: 0
m_RequireOpaqueTexture: 0
m_OpaqueDownsampling: 1
m_SupportsHDR: 0
m_MSAA: 1
m_RenderScale: 1
m_MainLightRenderingMode: 1
m_MainLightShadowsSupported: 1
m_MainLightShadowmapResolution: 2048
m_AdditionalLightsRenderingMode: 1
m_AdditionalLightsPerObjectLimit: 4
m_AdditionalLightShadowsSupported: 0
m_AdditionalLightsShadowmapResolution: 512
m_ShadowDistance: 50
m_ShadowCascades: 0
m_Cascade2Split: 0.25
m_Cascade4Split: {x: 0.067, y: 0.2, z: 0.467}
m_ShadowDepthBias: 1
m_ShadowNormalBias: 1
m_SoftShadowsSupported: 0
m_UseSRPBatcher: 1
m_SupportsDynamicBatching: 0
m_MixedLightingSupported: 1
m_ShadowType: 1
m_LocalShadowsSupported: 0
m_LocalShadowsAtlasResolution: 256
m_MaxPixelLights: 0
m_ShadowAtlasResolution: 256
m_ShaderVariantLogLevel: 0

View File

@@ -338,79 +338,69 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &190725482322260703
--- !u!1001 &5711328081031647150
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 190725481348338935, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_ForceIntoRT
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalPosition.z
value: -10
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338936, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814049, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338937, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_UpscaleRT
value: 0
objectReference: {fileID: 0}
- target: {fileID: 190725481348338939, guid: fe8fb0c1c30f84b43885e84de26e0f11,
- target: {fileID: 5711328081315814053, guid: fe8fb0c1c30f84b43885e84de26e0f11,
type: 3}
propertyPath: m_Name
value: Camera

View File

@@ -3,7 +3,7 @@
public class CutsceneManager : MonoBehaviour
{
[SerializeField]
Cutscene cutscene;
Cutscene cutscene = null;
void Start()
{

View File

@@ -1,134 +1,131 @@
using UnityEngine;
namespace Assets.Scripts
public static class Easing
{
public static class Easing
public static float QuadIn(float t) => t * t;
public static float QuadOut(float t) => t * (2f - t);
public static float QuadInOut(float t)
{
public static float QuadIn(float t) => t * t;
return (t *= 2f) < 1f
? .5f * t * t
: -.5f * ((t -= 1f) * (t - 2f) - 1f);
}
public static float QuadOut(float t) => t * (2f - t);
public static float CubeIn(float t) => t * t * t;
public static float QuadInOut(float t)
{
return (t *= 2f) < 1f
? .5f * t * t
: -.5f * ((t -= 1f) * (t - 2f) - 1f);
}
public static float CubeOut(float t) => 1f + ((t -= 1f) * t * t);
public static float CubeIn(float t) => t * t * t;
public static float CubeInOut(float t)
{
return (t *= 2f) < 1f
? .5f * t * t * t
: .5f * ((t -= 2f) * t * t + 2f);
}
public static float CubeOut(float t) => 1f + ((t -= 1f) * t * t);
public static float QuartIn(float t) => t * t * t * t;
public static float CubeInOut(float t)
{
return (t *= 2f) < 1f
? .5f * t * t * t
: .5f * ((t -= 2f) * t * t + 2f);
}
public static float QuartOut(float t) => 1f - ((t -= 1f) * t * t * t);
public static float QuartIn(float t) => t * t * t * t;
public static float QuartInOut(float t)
{
return (t *= 2f) < 1f
? .5f * t * t * t * t
: -.5f * ((t -= 2f) * t * t * t - 2f);
}
public static float QuartOut(float t) => 1f - ((t -= 1f) * t * t * t);
public static float QuintIn(float t) => t * t * t * t * t;
public static float QuartInOut(float t)
{
return (t *= 2f) < 1f
? .5f * t * t * t * t
: -.5f * ((t -= 2f) * t * t * t - 2f);
}
public static float QuintOut(float t) => 1f + ((t -= 1f) * t * t * t * t);
public static float QuintIn(float t) => t * t * t * t * t;
public static float QuintInOut(float t)
{
return (t *= 2f) < 1f
? .5f * t * t * t * t * t
: .5f * ((t -= 2f) * t * t * t * t + 2f);
}
public static float QuintOut(float t) => 1f + ((t -= 1f) * t * t * t * t);
public static float SineIn(float t) => 1f - Mathf.Cos(t * Mathf.PI / 2f);
public static float QuintInOut(float t)
{
return (t *= 2f) < 1f
? .5f * t * t * t * t * t
: .5f * ((t -= 2f) * t * t * t * t + 2f);
}
public static float SineOut(float t) => Mathf.Sin(t * Mathf.PI / 2f);
public static float SineIn(float t) => 1f - Mathf.Cos(t * Mathf.PI / 2f);
public static float SineInOut(float t) => .5f * (1f - Mathf.Cos(Mathf.PI * t));
public static float SineOut(float t) => Mathf.Sin(t * Mathf.PI / 2f);
public static float ExpoIn(float t) => t == 0f ? 0f : Mathf.Pow(1024f, t - 1f);
public static float SineInOut(float t) => .5f * (1f - Mathf.Cos(Mathf.PI * t));
public static float ExpoOut(float t) => t == 1f ? 1f : 1f - Mathf.Pow(2f, -10f * t);
public static float ExpoIn(float t) => t == 0f ? 0f : Mathf.Pow(1024f, t - 1f);
public static float ExpoInOut(float t)
{
if (t == 0f || t == 1f) return t;
public static float ExpoOut(float t) => t == 1f ? 1f : 1f - Mathf.Pow(2f, -10f * t);
return (t *= 2f) < 1f
? .5f * Mathf.Pow(1024f, t - 1f)
: .5f * (-Mathf.Pow(2f, -10f * (t - 1f)) + 2f);
}
public static float ExpoInOut(float t)
{
if (t == 0f || t == 1f) return t;
public static float CircIn(float t) => 1f - Mathf.Sqrt(1f - t * t);
return (t *= 2f) < 1f
? .5f * Mathf.Pow(1024f, t - 1f)
: .5f * (-Mathf.Pow(2f, -10f * (t - 1f)) + 2f);
}
public static float CircOut(float t) => Mathf.Sqrt(1f - ((t -= 1f) * t));
public static float CircIn(float t) => 1f - Mathf.Sqrt(1f - t * t);
public static float CircInOut(float t)
{
return (t *= 2f) < 1f
? -.5f * (Mathf.Sqrt(1f - t * t) - 1)
: .5f * (Mathf.Sqrt(1f - (t -= 2f) * t) + 1f);
}
public static float CircOut(float t) => Mathf.Sqrt(1f - ((t -= 1f) * t));
public static float ElastIn(float t)
{
if (t == 0f || t == 1f) return t;
public static float CircInOut(float t)
{
return (t *= 2f) < 1f
? -.5f * (Mathf.Sqrt(1f - t * t) - 1)
: .5f * (Mathf.Sqrt(1f - (t -= 2f) * t) + 1f);
}
return -Mathf.Pow(2f, 10f * (t -= 1f))
* Mathf.Sin((t - 0.1f) * (2f * Mathf.PI) / .4f);
}
public static float ElastIn(float t)
{
if (t == 0f || t == 1f) return t;
public static float ElastOut(float t)
{
if (t == 0f || t == 1f) return t;
return -Mathf.Pow(2f, 10f * (t -= 1f))
* Mathf.Sin((t - 0.1f) * (2f * Mathf.PI) / .4f);
}
return Mathf.Pow(2f, -10f * t)
* Mathf.Sin((t - .1f) * (2f * Mathf.PI) / .4f) + 1f;
}
public static float ElastOut(float t)
{
if (t == 0f || t == 1f) return t;
public static float ElastInOut(float t)
{
return (t *= 2f) < 1f
? -.5f * Mathf.Pow(2f, 10f * (t -= 1f))
* Mathf.Sin((t - .1f) * (2f * Mathf.PI) / .4f)
: Mathf.Pow(2f, -10f * (t -= 1f))
* Mathf.Sin((t - .1f) * (2f * Mathf.PI) / .4f) * .5f + 1f;
}
return Mathf.Pow(2f, -10f * t)
* Mathf.Sin((t - .1f) * (2f * Mathf.PI) / .4f) + 1f;
}
public static float BackIn(float t) => t * t * (2.70158f * t - 1.70158f);
public static float ElastInOut(float t)
{
return (t *= 2f) < 1f
? -.5f * Mathf.Pow(2f, 10f * (t -= 1f))
* Mathf.Sin((t - .1f) * (2f * Mathf.PI) / .4f)
: Mathf.Pow(2f, -10f * (t -= 1f))
* Mathf.Sin((t - .1f) * (2f * Mathf.PI) / .4f) * .5f + 1f;
}
public static float BackOut(float t) => (t -= 1f) * t * (2.70158f * t + 1.70158f) + 1f;
public static float BackIn(float t) => t * t * (2.70158f * t - 1.70158f);
public static float BackInOut(float t)
{
return (t *= 2f) < 1f
? .5f * (t * t * ((2.5949095f + 1f) * t - 2.5949095f))
: .5f * ((t -= 2f) * t * ((2.5949095f + 1f) * t + 2.5949095f) + 2f);
}
public static float BackOut(float t) => (t -= 1f) * t * (2.70158f * t + 1.70158f) + 1f;
public static float BounceIn(float t) => 1f - BounceOut(1f - t);
public static float BackInOut(float t)
{
return (t *= 2f) < 1f
? .5f * (t * t * ((2.5949095f + 1f) * t - 2.5949095f))
: .5f * ((t -= 2f) * t * ((2.5949095f + 1f) * t + 2.5949095f) + 2f);
}
public static float BounceOut(float t)
{
if (t < (1f / 2.75f)) return 7.5625f * t * t;
else if (t < (2f / 2.75f)) return 7.5625f * (t -= 1.5f / 2.75f) * t + .75f;
else if (t < (2.5f / 2.75f)) return 7.5625f * (t -= 2.25f / 2.75f) * t + .9375f;
else return 7.5625f * (t -= 2.625f / 2.75f) * t + .984375f;
}
public static float BounceIn(float t) => 1f - BounceOut(1f - t);
public static float BounceOut(float t)
{
if (t < (1f / 2.75f)) return 7.5625f * t * t;
else if (t < (2f / 2.75f)) return 7.5625f * (t -= 1.5f / 2.75f) * t + .75f;
else if (t < (2.5f / 2.75f)) return 7.5625f * (t -= 2.25f / 2.75f) * t + .9375f;
else return 7.5625f * (t -= 2.625f / 2.75f) * t + .984375f;
}
public static float BounceInOut(float t)
{
return t < 0.5f
? BounceIn(t * 2f) * .5f
: BounceOut(t * 2f - 1f) * .5f + .5f;
}
public static float BounceInOut(float t)
{
return t < 0.5f
? BounceIn(t * 2f) * .5f
: BounceOut(t * 2f - 1f) * .5f + .5f;
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: fbbbbc823584ba640a9854502f5eedfd
guid: 3978396887dbd7944a71427c5e5b5532
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -0,0 +1,55 @@
/// <summary>
/// RetroSuite-3D by oxysoft
/// https://github.com/oxysoft/RetroSuite3D
/// </summary>
using UnityEngine;
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
[AddComponentMenu("Image Effects/Dither")]
public class Dither : MonoBehaviour
{
Material mMaterial;
Shader shader;
public Texture2D pattern;
[Range(0f, 1f)]
public float threshold = .45f;
[Range(0f, 1f)]
public float strength = .45f;
Material Material
{
get
{
if (mMaterial == null)
{
shader = Shader.Find("Oxysoft/Dither");
mMaterial = new Material(shader) { hideFlags = HideFlags.DontSave };
}
return mMaterial;
}
}
public void OnRenderImage(RenderTexture src, RenderTexture dest)
{
if (Material)
{
Material.SetTexture("_Dither", pattern);
Material.SetInt("_Width", pattern.width);
Material.SetInt("_Height", pattern.height);
Material.SetFloat("_Threshold", threshold);
Material.SetFloat("_Strength", strength);
Graphics.Blit(src, dest, Material);
}
}
void OnDisable()
{
if (mMaterial)
DestroyImmediate(mMaterial);
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 56014676381a3cb418a607d72c29f23c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- pattern: {fileID: 2800000, guid: b269ce72120fe344fba7e2418d7188dd, type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,51 @@
/// <summary>
/// RetroSuite-3D by oxysoft
/// https://github.com/oxysoft/RetroSuite3D
/// </summary>
using UnityEngine;
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
[AddComponentMenu("Image Effects/Posterize")]
public class Posterize : MonoBehaviour
{
Material mMaterial;
Shader shader;
public int redComponent = 8;
public int greenComponent = 8;
public int blueComponent = 8;
Material Material
{
get
{
if (mMaterial == null)
{
shader = Shader.Find("Oxysoft/Posterize");
mMaterial = new Material(shader) { hideFlags = HideFlags.DontSave };
}
return mMaterial;
}
}
public void OnRenderImage(RenderTexture src, RenderTexture dest)
{
if (Material)
{
Material.SetInt("_Red", redComponent);
Material.SetInt("_Green", greenComponent);
Material.SetInt("_Blue", blueComponent);
Graphics.Blit(src, dest, Material);
}
}
void OnDisable()
{
if (mMaterial)
DestroyImmediate(mMaterial);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 53ccac51293442343b69d759bb128bb3
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,53 @@
/// <summary>
/// RetroSuite-3D by oxysoft
/// https://github.com/oxysoft/RetroSuite3D
/// </summary>
using UnityEngine;
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
[AddComponentMenu("Image Effects/Retro Pixel Max")]
public class RetroPixelMax : MonoBehaviour
{
Material mMaterial;
Shader shader;
[Header("Colors")]
public Color[] colors;
Material Material
{
get
{
if (mMaterial == null)
{
shader = Shader.Find("Oxysoft/RetroPixelMax");
mMaterial = new Material(shader) { hideFlags = HideFlags.DontSave };
}
return mMaterial;
}
}
public void OnRenderImage(RenderTexture src, RenderTexture dest)
{
if (Material && colors.Length > 0)
{
Material.SetInt("_ColorCount", colors.Length);
Material.SetColorArray("_Colors", colors);
Graphics.Blit(src, dest, Material);
}
else
{
Graphics.Blit(src, dest);
}
}
void OnDisable()
{
if (mMaterial)
DestroyImmediate(mMaterial);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: fb98cc8cfedcc5644a7af767e0a0d81e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
/// <summary>
/// RetroSuite-3D by oxysoft
/// https://github.com/oxysoft/RetroSuite3D
/// </summary>
using UnityEngine;
[ExecuteInEditMode]
[RequireComponent(typeof(Camera))]
[AddComponentMenu("Image Effects/Retro Size")]
public class RetroSize : MonoBehaviour
{
[Header("Resolution")]
public int horizontalResolution = 160;
public int verticalResolution = 144;
public void OnRenderImage(RenderTexture src, RenderTexture dest)
{
horizontalResolution = Mathf.Clamp(horizontalResolution, 1, 2048);
verticalResolution = Mathf.Clamp(verticalResolution, 1, 2048);
var scaled = RenderTexture.GetTemporary(horizontalResolution, verticalResolution);
scaled.filterMode = FilterMode.Point;
Graphics.Blit(src, scaled);
Graphics.Blit(scaled, dest);
RenderTexture.ReleaseTemporary(scaled);
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: e55f8c08e9740c04eb673d7bcc594299
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,22 +1,18 @@
using Assets.Scripts;
using System.Collections;
using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;
public class LogoIntroCutscene : Cutscene
{
[SerializeField]
GameObject logoCubic;
GameObject logoCubic = null;
[SerializeField]
GameObject logoFull;
GameObject logoFull = null;
[SerializeField]
SpriteRenderer logoFullRenderer;
SpriteRenderer logoFullRenderer = null;
protected override void OnSceneStart()
{
logoFull.SetActive(false);
logoCubic.SetActive(true);
logoCubic.transform.eulerAngles = Vector3.up * 90f;
}
protected override IEnumerator OnScenePlay()
@@ -24,7 +20,9 @@ public class LogoIntroCutscene : Cutscene
yield return RotateCube();
yield return new WaitForSeconds(.2f);
yield return FadeInLogo();
yield return new WaitForSeconds(.5f);
yield return new WaitForSeconds(1f);
yield return FadeOutLogo();
yield return new WaitForSeconds(.2f);
}
protected override void OnSceneEnd()
@@ -73,4 +71,19 @@ public class LogoIntroCutscene : Cutscene
yield return null;
}
}
IEnumerator FadeOutLogo()
{
const int maxTicks = 45;
var clearWhite = new Color(1f, 1f, 1f, 0f);
logoCubic.SetActive(false);
for (int i = 0; i <= maxTicks; i++)
{
var percent = Easing.SineOut(1f * i / maxTicks);
logoFullRenderer.color = Color.Lerp(Color.white, clearWhite, percent);
yield return null;
}
}
}

View File

@@ -1,8 +1,8 @@
fileFormatVersion: 2
guid: 01de7730f8d22fe42894f154d10b2ad5
NativeFormatImporter:
guid: b68269584dd3f4c40bad74b3ce194310
folderAsset: yes
DefaultImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,107 @@
Shader "Oxysoft/Dither" {
Properties {
_Threshold ("Threshold", Float) = 0.45
_Strength ("Strength", Float) = 0.45
_Width ("Width", Int) = 0.45
_Height ("Height", Int) = 0.45
_Dither ("Dither", 2D) = "white" {}
_MainTex ("", 2D) = "white" {}
}
SubShader {
Lighting Off
ZTest Always
Cull Off
ZWrite Off
Fog { Mode Off }
Pass {
CGPROGRAM
// Upgrade NOTE: excluded shader from DX11, Xbox360, OpenGL ES 2.0 because it uses unsized arrays
#pragma exclude_renderers flash
#pragma vertex vert_img
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
uniform float _Threshold;
uniform float _Strength;
uniform int _Width;
uniform int _Height;
uniform sampler2D _Dither;
uniform sampler2D _MainTex;
float luma(fixed3 color) {
return dot(color, fixed3(0.299, 0.587, 0.114));
}
float luma(fixed4 color) {
return dot(color.rgb, fixed3(0.299, 0.587, 0.114));
}
fixed4 ditherBayer2(fixed2 position, float brightness) {
int x = fmod(position.x, 4.0);
int y = fmod(position.y, 4.0);
int index = x + y * 4;
float lim = 0.0;
if (x < 8) {
if (index == 0) lim = 0.0625;
if (index == 1) lim = 0.5625;
if (index == 2) lim = 0.1875;
if (index == 3) lim = 0.6875;
if (index == 4) lim = 0.8125;
if (index == 5) lim = 0.3125;
if (index == 6) lim = 0.9375;
if (index == 7) lim = 0.4375;
if (index == 8) lim = 0.25;
if (index == 9) lim = 0.75;
if (index == 10) lim = 0.125;
if (index == 11) lim = 0.625;
if (index == 12) lim = 1.0;
if (index == 13) lim = 0.5;
if (index == 14) lim = 0.875;
if (index == 15) lim = 0.375;
}
if (brightness < lim * _Strength)
return 0.0;
return 1.0;
}
fixed3 ditherPattern2(fixed2 position, float brightness) {
int x = fmod(position.x, _Width);
int y = fmod(position.y, _Height);
float lim = 0.0;
lim = tex2D(_Dither, fixed2(x, y) / _Width).r;
if (brightness < lim * _Threshold)
return _Strength;
return 1.0;
}
fixed3 ditherBayer(fixed2 position, fixed3 col) {
return col * ditherBayer2(position, luma(col));
}
fixed3 ditherPattern(fixed2 position, fixed3 col) {
return col * ditherPattern2(position, luma(col));
}
fixed4 frag (v2f_img i) : COLOR
{
fixed3 col = tex2D (_MainTex, i.uv).rgb;
return fixed4(ditherPattern(i.pos.xy, col), 1.0);
}
ENDCG
}
}
FallBack "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 26bd9892d27d0114b93df1dacce3b21d
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,45 @@
Shader "Oxysoft/Posterize" {
Properties {
_Red ("Red", Int) = 8
_Green ("Green", Int) = 8
_Blue ("Blue", Int) = 8
_MainTex ("", 2D) = "white" {}
}
SubShader {
Lighting Off
ZTest Always
Cull Off
ZWrite Off
Fog { Mode Off }
Pass {
CGPROGRAM
// Upgrade NOTE: excluded shader from DX11, Xbox360, OpenGL ES 2.0 because it uses unsized arrays
#pragma exclude_renderers flash
#pragma vertex vert_img
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
uniform int _Red;
uniform int _Green;
uniform int _Blue;
uniform sampler2D _MainTex;
fixed4 frag (v2f_img i) : COLOR
{
fixed3 col = tex2D (_MainTex, i.uv).rgb;
fixed4 c = fixed4(0.0, 0.0, 0.0, 1.0);
c.r = floor(col.r * _Red) / _Red;
c.g = floor(col.g * _Green) / _Green;
c.b = floor(col.b * _Blue) / _Blue;
return c;
}
ENDCG
}
}
FallBack "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b310eee2f93ac2d46aa921a01dd77ef8
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,51 @@
Shader "Oxysoft/RetroPixelMax" {
Properties {
_ColorCount ("Color Count", Int) = 8
_MainTex ("", 2D) = "white" {}
}
SubShader {
Lighting Off
ZTest Always
Cull Off
ZWrite Off
Fog { Mode Off }
Pass {
CGPROGRAM
// Upgrade NOTE: excluded shader from DX11, Xbox360, OpenGL ES 2.0 because it uses unsized arrays
#pragma exclude_renderers flash
#pragma vertex vert_img
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#include "UnityCG.cginc"
uniform int _ColorCount;
uniform fixed4 _Colors[256];
uniform sampler2D _MainTex;
fixed4 frag (v2f_img i) : COLOR
{
fixed3 original = tex2D (_MainTex, i.uv).rgb;
fixed4 col = fixed4 (0,0,0,0);
fixed dist = 10000000.0;
for (int i = 0; i < _ColorCount; i++) {
fixed4 c = _Colors[i];
fixed d = distance(original, c);
if (d < dist) {
dist = d;
col = c;
}
}
return col;
}
ENDCG
}
}
FallBack "Diffuse"
}

View File

@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: e44bf8be36890b74081d936df1a0c129
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 187 B

View File

@@ -0,0 +1,151 @@
fileFormatVersion: 2
guid: b269ce72120fe344fba7e2418d7188dd
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 0
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 1
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 8
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Windows Store Apps
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -47,7 +47,7 @@ TextureImporter:
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 8
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1

View File

@@ -47,7 +47,7 @@ TextureImporter:
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 8
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
spriteGenerateFallbackPhysicsShape: 0
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1

View File

@@ -6,6 +6,6 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 0
path: Assets/Scenes/SampleScene.unity
path: Assets/Scenes/LogoIntro.unity
guid: 2cda990e2423bbf4892e6590ba056729
m_configObjects: {}

View File

@@ -31,11 +31,13 @@ GraphicsSettings:
m_AlwaysIncludedShaders:
- {fileID: 10753, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0}
- {fileID: 4800000, guid: 26bd9892d27d0114b93df1dacce3b21d, type: 3}
- {fileID: 4800000, guid: b310eee2f93ac2d46aa921a01dd77ef8, type: 3}
- {fileID: 4800000, guid: e44bf8be36890b74081d936df1a0c129, type: 3}
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
m_CustomRenderPipeline: {fileID: 11400000, guid: 01de7730f8d22fe42894f154d10b2ad5,
type: 2}
m_CustomRenderPipeline: {fileID: 0}
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}
m_DefaultRenderingPath: 1