├── .gitattributes ├── .gitignore ├── Assets ├── Materials.meta ├── Materials │ ├── billboard001.mat │ ├── billboard001.mat.meta │ ├── cube001.mat │ ├── cube001.mat.meta │ ├── cube002.mat │ ├── cube002.mat.meta │ ├── cube003.mat │ ├── cube003.mat.meta │ ├── tex001.mat │ ├── tex001.mat.meta │ ├── tex002.mat │ ├── tex002.mat.meta │ ├── tex003.mat │ ├── tex003.mat.meta │ ├── tex004.mat │ ├── tex004.mat.meta │ ├── tex006.mat │ └── tex006.mat.meta ├── Shaders.meta ├── Shaders │ ├── Billboard.meta │ ├── Billboard │ │ ├── billboard.cs │ │ └── billboard.cs.meta │ ├── Reflective.meta │ ├── Reflective │ │ ├── psx-unlit-add.shader │ │ ├── psx-unlit-add.shader.meta │ │ ├── psx-unlit-mult.shader │ │ ├── psx-unlit-mult.shader.meta │ │ ├── psx-unlit_noambient-add.shader │ │ ├── psx-unlit_noambient-add.shader.meta │ │ ├── psx-unlit_noambient-mult.shader │ │ ├── psx-unlit_noambient-mult.shader.meta │ │ ├── psx-vertexlit-add.shader │ │ ├── psx-vertexlit-add.shader.meta │ │ ├── psx-vertexlit-mult.shader │ │ └── psx-vertexlit-mult.shader.meta │ ├── Resources.meta │ ├── Resources │ │ ├── cPrecision.shader │ │ └── cPrecision.shader.meta │ ├── Trasparent.meta │ ├── Trasparent │ │ ├── psx-trasparent-unlit-noambient.shader │ │ ├── psx-trasparent-unlit-noambient.shader.meta │ │ ├── psx-trasparent-unlit.shader │ │ ├── psx-trasparent-unlit.shader.meta │ │ ├── psx-trasparent-vertexlit.shader │ │ └── psx-trasparent-vertexlit.shader.meta │ ├── imageEffects.meta │ ├── imageEffects │ │ ├── cPrecision.cs │ │ ├── cPrecision.cs.meta │ │ ├── palette.png │ │ └── palette.png.meta │ ├── psx-unlit.shader │ ├── psx-unlit.shader.meta │ ├── psx-unlit_noambient.shader │ ├── psx-unlit_noambient.shader.meta │ ├── psx-vertexlit.shader │ └── psx-vertexlit.shader.meta ├── Textures.meta ├── Textures │ ├── Skyboxes.meta │ ├── Skyboxes │ │ ├── Cubemap.png │ │ └── Cubemap.png.meta │ ├── tex001.jpg │ ├── tex001.jpg.meta │ ├── tex002.jpg │ ├── tex002.jpg.meta │ ├── tex003.jpg │ ├── tex003.jpg.meta │ ├── tex004.png │ ├── tex004.png.meta │ ├── tex005.png │ ├── tex005.png.meta │ ├── tex006.png │ └── tex006.png.meta ├── UnityVS │ ├── Editor.meta │ └── Editor │ │ ├── SyntaxTree.VisualStudio.Unity.Messaging.dll │ │ ├── UnityVS.VersionSpecific.dll │ │ └── UnityVS.VersionSpecific.dll.meta ├── rotate.cs ├── rotate.cs.meta ├── testscene.unity └── testscene.unity.meta ├── LICENSE ├── ProjectSettings ├── AudioManager.asset ├── ClusterInputManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshAreas.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── ProjectVersion.txt ├── QualitySettings.asset ├── TagManager.asset ├── TimeManager.asset ├── UnityAdsSettings.asset └── UnityConnectSettings.asset ├── README.md └── Unity.gitignore /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | [Bb]uild/ 5 | 6 | # Autogenerated VS/MD solution and project files 7 | /*.csproj 8 | /*.unityproj 9 | /*.sln 10 | /*.suo 11 | /*.user 12 | /*.userprefs 13 | /*.pidb 14 | /*.booproj 15 | 16 | #Unity3D Generated File On Crash Reports 17 | sysinfo.txt 18 | 19 | # ========================= 20 | # Operating System Files 21 | # ========================= 22 | 23 | # OSX 24 | # ========================= 25 | 26 | .DS_Store 27 | .AppleDouble 28 | .LSOverride 29 | 30 | # Thumbnails 31 | ._* 32 | 33 | # Files that might appear on external disk 34 | .Spotlight-V100 35 | .Trashes 36 | 37 | # Directories potentially created on remote AFP share 38 | .AppleDB 39 | .AppleDesktop 40 | Network Trash Folder 41 | Temporary Items 42 | .apdisk 43 | 44 | # Windows 45 | # ========================= 46 | 47 | # Windows image file caches 48 | Thumbs.db 49 | ehthumbs.db 50 | 51 | # Folder config file 52 | Desktop.ini 53 | 54 | # Recycle Bin used on file shares 55 | $RECYCLE.BIN/ 56 | 57 | # Windows Installer files 58 | *.cab 59 | *.msi 60 | *.msm 61 | *.msp 62 | 63 | # Windows shortcuts 64 | *.lnk 65 | Assets/UnityVS.meta 66 | Assets/UnityVS/Editor/SyntaxTree.VisualStudio.Unity.Bridge.dll 67 | Assets/UnityVS/Editor/SyntaxTree.VisualStudio.Unity.Messaging.dll.meta 68 | debug-glsl-error-in-d3dcompile-orig.txt 69 | debug-glsl-error-in-d3dcompile.txt 70 | -------------------------------------------------------------------------------- /Assets/Materials.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9c17e336c640f71409061134ff4ed46b 3 | folderAsset: yes 4 | timeCreated: 1439449779 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Materials/billboard001.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Materials/billboard001.mat -------------------------------------------------------------------------------- /Assets/Materials/billboard001.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: beae8e544cba2544d9457eaa2ea00a72 3 | timeCreated: 1467279001 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/cube001.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Materials/cube001.mat -------------------------------------------------------------------------------- /Assets/Materials/cube001.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 003257e0d27e9be449e3c7868c86bbdc 3 | timeCreated: 1467193961 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/cube002.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Materials/cube002.mat -------------------------------------------------------------------------------- /Assets/Materials/cube002.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9ec8aaefa4d9bfc469017cafcac107c4 3 | timeCreated: 1467202416 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/cube003.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Materials/cube003.mat -------------------------------------------------------------------------------- /Assets/Materials/cube003.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed96f9052980d3f479a8e4dd43e99a2b 3 | timeCreated: 1467203122 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/tex001.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Materials/tex001.mat -------------------------------------------------------------------------------- /Assets/Materials/tex001.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a683820b87a7b6c4a9a1151a2fd05b96 3 | timeCreated: 1439450111 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/tex002.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Materials/tex002.mat -------------------------------------------------------------------------------- /Assets/Materials/tex002.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5bbedd19a4a4acd4d88e8998a4ff0ef6 3 | timeCreated: 1439449780 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/tex003.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Materials/tex003.mat -------------------------------------------------------------------------------- /Assets/Materials/tex003.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 60f0ec14cbf17484bbb8bc39e0eb8381 3 | timeCreated: 1439449927 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/tex004.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Materials/tex004.mat -------------------------------------------------------------------------------- /Assets/Materials/tex004.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 947e668c9d7230345aaa6972e7f428c4 3 | timeCreated: 1439450559 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Materials/tex006.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Materials/tex006.mat -------------------------------------------------------------------------------- /Assets/Materials/tex006.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 823049fc3574746478b53a3c2d849e78 3 | timeCreated: 1467290928 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Shaders.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6cc1371f5e6c4df4abbd289ffa3855b8 3 | folderAsset: yes 4 | timeCreated: 1439449704 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Billboard.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d13d78a5bb5f6a04dac3ff4075fbbf0d 3 | folderAsset: yes 4 | timeCreated: 1467290045 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Billboard/billboard.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class billboard : MonoBehaviour 5 | { 6 | 7 | void Start () 8 | { 9 | if (billboard.cam == null) 10 | { 11 | cam = GameObject.FindGameObjectWithTag("MainCamera").GetComponent(); 12 | } 13 | } 14 | 15 | public static Transform cam; 16 | public Vector3 freeRotation = Vector3.one; 17 | Vector3 eangles = Vector3.zero; 18 | 19 | void LateUpdate() 20 | { 21 | this.transform.LookAt(billboard.cam); 22 | transform.Rotate(0, 180, 0); 23 | eangles = transform.eulerAngles; 24 | eangles.x *= freeRotation.x; 25 | eangles.y *= freeRotation.y; 26 | eangles.z *= freeRotation.z; 27 | transform.eulerAngles = eangles; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assets/Shaders/Billboard/billboard.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 21936717c9a19c642b831fe3c2bb96a7 3 | timeCreated: 1467290322 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Shaders/Reflective.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86356c96ca41eb14f9eb55d7da98a1c5 3 | folderAsset: yes 4 | timeCreated: 1467193668 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-unlit-add.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/reflective/unlit-Add" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | _Cube("Cubemap", CUBE) = "" {} 5 | } 6 | SubShader{ 7 | Tags{ "RenderType" = "Opaque" } 8 | LOD 200 9 | 10 | Pass{ 11 | Lighting On 12 | CGPROGRAM 13 | 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | #include "UnityCG.cginc" 17 | 18 | struct v2f 19 | { 20 | fixed4 pos : SV_POSITION; 21 | half4 color : COLOR0; 22 | half4 colorFog : COLOR1; 23 | float2 uv_MainTex : TEXCOORD0; 24 | half3 normal : TEXCOORD1; 25 | float3 reflect : COLOR2; 26 | }; 27 | 28 | float4 _MainTex_ST; 29 | uniform half4 unity_FogStart; 30 | uniform half4 unity_FogEnd; 31 | 32 | v2f vert(appdata_full v) 33 | { 34 | v2f o; 35 | 36 | //Vertex snapping 37 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 38 | float4 vertex = snapToPixel; 39 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 40 | vertex.x = floor(160 * vertex.x) / 160; 41 | vertex.y = floor(120 * vertex.y) / 120; 42 | vertex.xyz *= snapToPixel.w; 43 | o.pos = vertex; 44 | 45 | //Reflection 46 | float3 viewDir = WorldSpaceViewDir(v.vertex); 47 | float3 worldN = mul((float3x3)_Object2World, v.normal * 1.0); 48 | o.reflect = reflect(-viewDir, worldN); 49 | 50 | //Vertex lighting 51 | o.color = v.color*UNITY_LIGHTMODEL_AMBIENT;; 52 | 53 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 54 | 55 | //Affine Texture Mapping 56 | float4 affinePos = vertex;//vertex; 57 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 58 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 59 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 60 | 61 | //Affine texturing for cubemap 62 | o.reflect *= o.normal; 63 | 64 | //Fog 65 | float4 fogColor = unity_FogColor; 66 | 67 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 68 | o.normal.g = fogDensity; 69 | o.normal.b = 1; 70 | 71 | o.colorFog = fogColor; 72 | o.colorFog.a = clamp(fogDensity,0,1); 73 | 74 | //Cut out polygons 75 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 76 | { 77 | o.pos.w = 0; 78 | } 79 | 80 | 81 | return o; 82 | } 83 | 84 | sampler2D _MainTex; 85 | samplerCUBE _Cube; 86 | 87 | float4 frag(v2f IN) : COLOR 88 | { 89 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 90 | c += texCUBE(_Cube, IN.reflect); 91 | half4 color = c*(IN.colorFog.a); 92 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 93 | return color; 94 | } 95 | ENDCG 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-unlit-add.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9a1e13caa1e505646a45745b8563b411 3 | timeCreated: 1467193668 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-unlit-mult.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/reflective/unlit-Mult" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | _Cube("Cubemap", CUBE) = "" {} 5 | } 6 | SubShader{ 7 | Tags{ "RenderType" = "Opaque" } 8 | LOD 200 9 | 10 | Pass{ 11 | Lighting On 12 | CGPROGRAM 13 | 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | #include "UnityCG.cginc" 17 | 18 | struct v2f 19 | { 20 | fixed4 pos : SV_POSITION; 21 | half4 color : COLOR0; 22 | half4 colorFog : COLOR1; 23 | float2 uv_MainTex : TEXCOORD0; 24 | half3 normal : TEXCOORD1; 25 | float3 reflect : COLOR2; 26 | }; 27 | 28 | float4 _MainTex_ST; 29 | uniform half4 unity_FogStart; 30 | uniform half4 unity_FogEnd; 31 | 32 | v2f vert(appdata_full v) 33 | { 34 | v2f o; 35 | 36 | //Vertex snapping 37 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 38 | float4 vertex = snapToPixel; 39 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 40 | vertex.x = floor(160 * vertex.x) / 160; 41 | vertex.y = floor(120 * vertex.y) / 120; 42 | vertex.xyz *= snapToPixel.w; 43 | o.pos = vertex; 44 | 45 | //Reflection 46 | float3 viewDir = WorldSpaceViewDir(v.vertex); 47 | float3 worldN = mul((float3x3)_Object2World, v.normal * 1.0); 48 | o.reflect = reflect(-viewDir, worldN); 49 | 50 | //Vertex lighting 51 | o.color = v.color*UNITY_LIGHTMODEL_AMBIENT;; 52 | 53 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 54 | 55 | //Affine Texture Mapping 56 | float4 affinePos = vertex;//vertex; 57 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 58 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 59 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 60 | 61 | //Affine texturing for cubemap 62 | o.reflect *= o.normal; 63 | 64 | //Fog 65 | float4 fogColor = unity_FogColor; 66 | 67 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 68 | o.normal.g = fogDensity; 69 | o.normal.b = 1; 70 | 71 | o.colorFog = fogColor; 72 | o.colorFog.a = clamp(fogDensity,0,1); 73 | 74 | //Cut out polygons 75 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 76 | { 77 | o.pos.w = 0; 78 | } 79 | 80 | 81 | return o; 82 | } 83 | 84 | sampler2D _MainTex; 85 | samplerCUBE _Cube; 86 | 87 | float4 frag(v2f IN) : COLOR 88 | { 89 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 90 | c *= texCUBE(_Cube, IN.reflect); 91 | half4 color = c*(IN.colorFog.a); 92 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 93 | return color; 94 | } 95 | ENDCG 96 | } 97 | } 98 | } -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-unlit-mult.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 11dee6746ab7cdd4888a16256887487d 3 | timeCreated: 1467221438 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-unlit_noambient-add.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/reflective/unlit_noambient-Add" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | _Cube("Cubemap", CUBE) = "" {} 5 | } 6 | SubShader{ 7 | Tags{ "RenderType" = "Opaque" } 8 | LOD 200 9 | 10 | Pass{ 11 | Lighting Off 12 | CGPROGRAM 13 | 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | #include "UnityCG.cginc" 17 | 18 | struct v2f 19 | { 20 | fixed4 pos : SV_POSITION; 21 | half4 color : COLOR0; 22 | half4 colorFog : COLOR1; 23 | float2 uv_MainTex : TEXCOORD0; 24 | half3 normal : TEXCOORD1; 25 | float3 reflect : COLOR2; 26 | }; 27 | 28 | float4 _MainTex_ST; 29 | uniform half4 unity_FogStart; 30 | uniform half4 unity_FogEnd; 31 | 32 | v2f vert(appdata_full v) 33 | { 34 | v2f o; 35 | 36 | //Vertex snapping 37 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 38 | float4 vertex = snapToPixel; 39 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 40 | vertex.x = floor(160 * vertex.x) / 160; 41 | vertex.y = floor(120 * vertex.y) / 120; 42 | vertex.xyz *= snapToPixel.w; 43 | o.pos = vertex; 44 | 45 | //Reflection 46 | float3 viewDir = WorldSpaceViewDir(o.pos); 47 | float3 worldN = mul((float3x3)_Object2World, v.normal * 1.0); 48 | o.reflect = reflect(-viewDir, worldN); 49 | 50 | //Vertex lighting 51 | o.color = v.color; 52 | 53 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 54 | 55 | //Affine Texture Mapping 56 | float4 affinePos = vertex;//vertex; 57 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 58 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 59 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 60 | 61 | //Fog 62 | float4 fogColor = unity_FogColor; 63 | 64 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 65 | o.normal.g = fogDensity; 66 | o.normal.b = 1; 67 | 68 | o.colorFog = fogColor; 69 | o.colorFog.a = clamp(fogDensity,0,1); 70 | 71 | //Cut out polygons 72 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 73 | { 74 | o.pos.w = 0; 75 | } 76 | 77 | 78 | return o; 79 | } 80 | 81 | sampler2D _MainTex; 82 | samplerCUBE _Cube; 83 | 84 | float4 frag(v2f IN) : COLOR 85 | { 86 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 87 | c += texCUBE(_Cube, IN.reflect); 88 | half4 color = c*(IN.colorFog.a); 89 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 90 | return color; 91 | } 92 | ENDCG 93 | } 94 | } 95 | } -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-unlit_noambient-add.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f350dfbe8b73f1f448a2bf7289450f90 3 | timeCreated: 1467193668 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-unlit_noambient-mult.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/reflective/unlit_noambient-Mult" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | _Cube("Cubemap", CUBE) = "" {} 5 | } 6 | SubShader{ 7 | Tags{ "RenderType" = "Opaque" } 8 | LOD 200 9 | 10 | Pass{ 11 | Lighting Off 12 | CGPROGRAM 13 | 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | #include "UnityCG.cginc" 17 | 18 | struct v2f 19 | { 20 | fixed4 pos : SV_POSITION; 21 | half4 color : COLOR0; 22 | half4 colorFog : COLOR1; 23 | float2 uv_MainTex : TEXCOORD0; 24 | half3 normal : TEXCOORD1; 25 | float3 reflect : COLOR2; 26 | }; 27 | 28 | float4 _MainTex_ST; 29 | uniform half4 unity_FogStart; 30 | uniform half4 unity_FogEnd; 31 | 32 | v2f vert(appdata_full v) 33 | { 34 | v2f o; 35 | 36 | //Vertex snapping 37 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 38 | float4 vertex = snapToPixel; 39 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 40 | vertex.x = floor(160 * vertex.x) / 160; 41 | vertex.y = floor(120 * vertex.y) / 120; 42 | vertex.xyz *= snapToPixel.w; 43 | o.pos = vertex; 44 | 45 | //Reflection 46 | float3 viewDir = WorldSpaceViewDir(o.pos); 47 | float3 worldN = mul((float3x3)_Object2World, v.normal * 1.0); 48 | o.reflect = reflect(-viewDir, worldN); 49 | 50 | //Vertex lighting 51 | o.color = v.color; 52 | 53 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 54 | 55 | //Affine Texture Mapping 56 | float4 affinePos = vertex;//vertex; 57 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 58 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 59 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 60 | 61 | //Fog 62 | float4 fogColor = unity_FogColor; 63 | 64 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 65 | o.normal.g = fogDensity; 66 | o.normal.b = 1; 67 | 68 | o.colorFog = fogColor; 69 | o.colorFog.a = clamp(fogDensity,0,1); 70 | 71 | //Cut out polygons 72 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 73 | { 74 | o.pos.w = 0; 75 | } 76 | 77 | 78 | return o; 79 | } 80 | 81 | sampler2D _MainTex; 82 | samplerCUBE _Cube; 83 | 84 | float4 frag(v2f IN) : COLOR 85 | { 86 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 87 | c *= texCUBE(_Cube, IN.reflect); 88 | half4 color = c*(IN.colorFog.a); 89 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 90 | return color; 91 | } 92 | ENDCG 93 | } 94 | } 95 | } -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-unlit_noambient-mult.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bb629a7c9fdda8749a65d6f103229dda 3 | timeCreated: 1467221438 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-vertexlit-add.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/reflective/vertexlit-Add" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | _Cube("Cubemap", CUBE) = "" {} 5 | } 6 | SubShader{ 7 | Tags { "RenderType" = "Opaque" } 8 | LOD 200 9 | 10 | Pass { 11 | Lighting On 12 | CGPROGRAM 13 | 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | #include "UnityCG.cginc" 17 | 18 | struct v2f 19 | { 20 | fixed4 pos : SV_POSITION; 21 | half4 color : COLOR0; 22 | half4 colorFog : COLOR1; 23 | float2 uv_MainTex : TEXCOORD0; 24 | half3 normal : TEXCOORD1; 25 | float3 reflect : COLOR2; 26 | }; 27 | 28 | float4 _MainTex_ST; 29 | uniform half4 unity_FogStart; 30 | uniform half4 unity_FogEnd; 31 | 32 | v2f vert(appdata_full v) 33 | { 34 | v2f o; 35 | 36 | //Vertex snapping 37 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 38 | float4 vertex = snapToPixel; 39 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 40 | vertex.x = floor(160 * vertex.x) / 160; 41 | vertex.y = floor(120 * vertex.y) / 120; 42 | vertex.xyz *= snapToPixel.w; 43 | o.pos = vertex; 44 | 45 | //Reflection 46 | float3 viewDir = WorldSpaceViewDir(v.vertex); 47 | float3 worldN = mul((float3x3)_Object2World, v.normal * 1.0); 48 | o.reflect = reflect(-viewDir, worldN); 49 | 50 | //Vertex lighting 51 | // o.color = float4(ShadeVertexLights(v.vertex, v.normal), 1.0); 52 | o.color = float4(ShadeVertexLightsFull(v.vertex, v.normal, 4, true), 1.0); 53 | o.color *= v.color; 54 | 55 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 56 | 57 | //Affine Texture Mapping 58 | float4 affinePos = vertex; //vertex; 59 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 60 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 61 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 62 | 63 | //Affine texturing for cubemap 64 | o.reflect *= o.normal; 65 | //Fog 66 | float4 fogColor = unity_FogColor; 67 | 68 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 69 | o.normal.g = fogDensity; 70 | o.normal.b = 1; 71 | 72 | o.colorFog = fogColor; 73 | o.colorFog.a = clamp(fogDensity,0,1); 74 | 75 | //Cut out polygons 76 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 77 | { 78 | o.pos.w = 0; 79 | } 80 | 81 | return o; 82 | } 83 | 84 | sampler2D _MainTex; 85 | samplerCUBE _Cube; 86 | 87 | float4 frag(v2f IN) : COLOR 88 | { 89 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 90 | c+= texCUBE(_Cube, IN.reflect); 91 | half4 color = c*(IN.colorFog.a); 92 | 93 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 94 | return color; 95 | } 96 | ENDCG 97 | } 98 | } 99 | } -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-vertexlit-add.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3766e70f00ccca14197e7ce39478be3a 3 | timeCreated: 1467193668 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-vertexlit-mult.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/reflective/vertexlit-Mult" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | _Cube("Cubemap", CUBE) = "" {} 5 | } 6 | SubShader{ 7 | Tags { "RenderType" = "Opaque" } 8 | LOD 200 9 | 10 | Pass { 11 | Lighting On 12 | CGPROGRAM 13 | 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | #include "UnityCG.cginc" 17 | 18 | struct v2f 19 | { 20 | fixed4 pos : SV_POSITION; 21 | half4 color : COLOR0; 22 | half4 colorFog : COLOR1; 23 | float2 uv_MainTex : TEXCOORD0; 24 | half3 normal : TEXCOORD1; 25 | float3 reflect : COLOR2; 26 | }; 27 | 28 | float4 _MainTex_ST; 29 | uniform half4 unity_FogStart; 30 | uniform half4 unity_FogEnd; 31 | 32 | v2f vert(appdata_full v) 33 | { 34 | v2f o; 35 | 36 | //Vertex snapping 37 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 38 | float4 vertex = snapToPixel; 39 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 40 | vertex.x = floor(160 * vertex.x) / 160; 41 | vertex.y = floor(120 * vertex.y) / 120; 42 | vertex.xyz *= snapToPixel.w; 43 | o.pos = vertex; 44 | 45 | //Reflection 46 | float3 viewDir = WorldSpaceViewDir(v.vertex); 47 | float3 worldN = mul((float3x3)_Object2World, v.normal * 1.0); 48 | o.reflect = reflect(-viewDir, worldN); 49 | 50 | //Vertex lighting 51 | // o.color = float4(ShadeVertexLights(v.vertex, v.normal), 1.0); 52 | o.color = float4(ShadeVertexLightsFull(v.vertex, v.normal, 4, true), 1.0); 53 | o.color *= v.color; 54 | 55 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 56 | 57 | //Affine Texture Mapping 58 | float4 affinePos = vertex; //vertex; 59 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 60 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 61 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 62 | 63 | //Affine texturing for cubemap 64 | o.reflect *= o.normal; 65 | //Fog 66 | float4 fogColor = unity_FogColor; 67 | 68 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 69 | o.normal.g = fogDensity; 70 | o.normal.b = 1; 71 | 72 | o.colorFog = fogColor; 73 | o.colorFog.a = clamp(fogDensity,0,1); 74 | 75 | //Cut out polygons 76 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 77 | { 78 | o.pos.w = 0; 79 | } 80 | 81 | return o; 82 | } 83 | 84 | sampler2D _MainTex; 85 | samplerCUBE _Cube; 86 | 87 | float4 frag(v2f IN) : COLOR 88 | { 89 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 90 | c*= texCUBE(_Cube, IN.reflect); 91 | half4 color = c*(IN.colorFog.a); 92 | 93 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 94 | return color; 95 | } 96 | ENDCG 97 | } 98 | } 99 | } -------------------------------------------------------------------------------- /Assets/Shaders/Reflective/psx-vertexlit-mult.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c5154b6cfffb708458ec72baa67cfd1c 3 | timeCreated: 1467221438 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Resources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 334a86c87fcdee84ba61a79f57799b61 3 | folderAsset: yes 4 | timeCreated: 1466069872 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Resources/cPrecision.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/cPrecision" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | _Colors("Color precision", Float) = 0 7 | _Palette("Palette", 2D) = "white" {} 8 | } 9 | SubShader 10 | { 11 | // No culling or depth 12 | Cull Off ZWrite Off ZTest Always 13 | 14 | Pass 15 | { 16 | CGPROGRAM 17 | #pragma vertex vert 18 | #pragma fragment frag 19 | 20 | #include "UnityCG.cginc" 21 | 22 | struct appdata 23 | { 24 | float4 vertex : POSITION; 25 | float2 uv : TEXCOORD0; 26 | }; 27 | 28 | struct v2f 29 | { 30 | float2 uv : TEXCOORD0; 31 | float4 vertex : SV_POSITION; 32 | }; 33 | 34 | v2f vert (appdata v) 35 | { 36 | v2f o; 37 | o.vertex = mul(UNITY_MATRIX_MVP, v.vertex); 38 | o.uv = v.uv; 39 | return o; 40 | } 41 | 42 | sampler2D _MainTex; 43 | sampler2D _Palette; 44 | float _usePalette; 45 | float _Colors; 46 | 47 | fixed4 frag (v2f i) : SV_Target 48 | { 49 | fixed4 col = tex2D(_MainTex , i.uv); 50 | col *= _Colors; 51 | col = floor(col); 52 | col /= _Colors; 53 | if (_usePalette == 1) col = tex2D(_Palette, float2((col.r+col.g+col.b)/3, i.uv.y)); 54 | return col; 55 | } 56 | ENDCG 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /Assets/Shaders/Resources/cPrecision.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a2f9d4f98d6a3424fabca5882dc1a55e 3 | timeCreated: 1465722275 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Trasparent.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f3f21d2adbeffc04498067f4a45cfaa9 3 | folderAsset: yes 4 | timeCreated: 1431593662 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Trasparent/psx-trasparent-unlit-noambient.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/trasparent/unlit_noambient" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | } 5 | SubShader{ 6 | Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" } 7 | LOD 200 8 | Blend SrcAlpha OneMinusSrcAlpha 9 | Zwrite Off 10 | Pass{ 11 | Lighting On 12 | CGPROGRAM 13 | 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | #include "UnityCG.cginc" 17 | 18 | struct v2f 19 | { 20 | fixed4 pos : SV_POSITION; 21 | half4 color : COLOR0; 22 | half4 colorFog : COLOR1; 23 | float2 uv_MainTex : TEXCOORD0; 24 | half3 normal: TEXCOORD1; 25 | }; 26 | 27 | float4 _MainTex_ST; 28 | uniform half4 unity_FogStart; 29 | uniform half4 unity_FogEnd; 30 | 31 | v2f vert(appdata_full v) 32 | { 33 | v2f o; 34 | 35 | //Vertex snapping 36 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 37 | float4 vertex = snapToPixel; 38 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 39 | vertex.x = floor(160 * vertex.x) / 160; 40 | vertex.y = floor(120 * vertex.y) / 120; 41 | vertex.xyz *= snapToPixel.w; 42 | o.pos = vertex; 43 | 44 | //Vertex lighting 45 | 46 | o.color = v.color; 47 | 48 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 49 | 50 | //Affine Texture Mapping 51 | float4 affinePos = vertex;//vertex; 52 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 53 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 54 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 55 | 56 | //Fog 57 | float4 fogColor = unity_FogColor; 58 | 59 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 60 | o.normal.g = fogDensity; 61 | o.normal.b = 1; 62 | 63 | o.colorFog = fogColor; 64 | o.colorFog.a = clamp(fogDensity,0,1); 65 | 66 | //Cut out polygons 67 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 68 | { 69 | o.pos.w = 0; 70 | } 71 | 72 | 73 | return o; 74 | } 75 | 76 | sampler2D _MainTex; 77 | 78 | float4 frag(v2f IN) : COLOR 79 | { 80 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 81 | half4 color = c*(IN.colorFog.a); 82 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 83 | color.a = c.a; 84 | return color; 85 | } 86 | ENDCG 87 | } 88 | } 89 | } -------------------------------------------------------------------------------- /Assets/Shaders/Trasparent/psx-trasparent-unlit-noambient.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7510e806f737f5c4f8a6d0c5193d20fc 3 | timeCreated: 1440609586 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Trasparent/psx-trasparent-unlit.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/trasparent/unlit" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | } 5 | SubShader{ 6 | Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" } 7 | LOD 200 8 | Blend SrcAlpha OneMinusSrcAlpha 9 | Zwrite Off 10 | Pass{ 11 | Lighting On 12 | CGPROGRAM 13 | 14 | #pragma vertex vert 15 | #pragma fragment frag 16 | #include "UnityCG.cginc" 17 | 18 | struct v2f 19 | { 20 | fixed4 pos : SV_POSITION; 21 | half4 color : COLOR0; 22 | half4 colorFog : COLOR1; 23 | float2 uv_MainTex : TEXCOORD0; 24 | half3 normal :TEXCOORD1; 25 | }; 26 | 27 | float4 _MainTex_ST; 28 | uniform half4 unity_FogStart; 29 | uniform half4 unity_FogEnd; 30 | 31 | v2f vert(appdata_full v) 32 | { 33 | v2f o; 34 | 35 | //Vertex snapping 36 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 37 | float4 vertex = snapToPixel; 38 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 39 | vertex.x = floor(160 * vertex.x) / 160; 40 | vertex.y = floor(120 * vertex.y) / 120; 41 | vertex.xyz *= snapToPixel.w; 42 | o.pos = vertex; 43 | 44 | //Vertex lighting 45 | o.color = v.color*UNITY_LIGHTMODEL_AMBIENT; 46 | 47 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 48 | 49 | //Affine Texture Mapping 50 | float4 affinePos = vertex;//vertex; 51 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 52 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 53 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 54 | 55 | //Fog 56 | float4 fogColor = unity_FogColor; 57 | 58 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 59 | o.normal.g = fogDensity; 60 | o.normal.b = 1; 61 | 62 | o.colorFog = fogColor; 63 | o.colorFog.a = clamp(fogDensity,0,1); 64 | 65 | //Cut out polygons 66 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 67 | { 68 | o.pos.w = 0; 69 | } 70 | 71 | 72 | return o; 73 | } 74 | 75 | sampler2D _MainTex; 76 | 77 | float4 frag(v2f IN) : COLOR 78 | { 79 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 80 | half4 color = c*(IN.colorFog.a); 81 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 82 | color.a = c.a; 83 | return color; 84 | } 85 | ENDCG 86 | } 87 | } 88 | } -------------------------------------------------------------------------------- /Assets/Shaders/Trasparent/psx-trasparent-unlit.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 015294d7b7044ba40ba50b0c05df3b50 3 | timeCreated: 1431593948 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/Trasparent/psx-trasparent-vertexlit.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/trasparent/vertexlit" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | } 5 | SubShader{ 6 | Tags{ "Queue" = "Transparent" "RenderType" = "Transparent" } 7 | LOD 200 8 | Blend SrcAlpha OneMinusSrcAlpha 9 | Pass{ 10 | Lighting On 11 | CGPROGRAM 12 | 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | #include "UnityCG.cginc" 16 | 17 | struct v2f 18 | { 19 | fixed4 pos : SV_POSITION; 20 | half4 color : COLOR0; 21 | half4 colorFog : COLOR1; 22 | float2 uv_MainTex : TEXCOORD0; 23 | half3 normal: TEXCOORD1; 24 | }; 25 | 26 | float4 _MainTex_ST; 27 | uniform half4 unity_FogStart; 28 | uniform half4 unity_FogEnd; 29 | 30 | v2f vert(appdata_full v) 31 | { 32 | v2f o; 33 | 34 | //Vertex snapping 35 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 36 | float4 vertex = snapToPixel; 37 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 38 | vertex.x = floor(160 * vertex.x) / 160; 39 | vertex.y = floor(120 * vertex.y) / 120; 40 | vertex.xyz *= snapToPixel.w; 41 | o.pos = vertex; 42 | 43 | 44 | //o.pos = mul(UNITY_MATRIX_MVP, v.vertex); 45 | //Vertex lighting 46 | //o.color = float4(ShadeVertexLights(v.vertex, v.normal), 1.0); 47 | o.color = float4(ShadeVertexLightsFull(v.vertex, v.normal, 4, true), 1.0); 48 | o.color *= v.color; 49 | 50 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 51 | 52 | //Affine Texture Mapping 53 | float4 affinePos = vertex;//vertex; 54 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 55 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 56 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 57 | 58 | //Fog 59 | float4 fogColor = unity_FogColor; 60 | 61 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 62 | o.normal.g = fogDensity; 63 | o.normal.b = 1; 64 | 65 | o.colorFog = fogColor; 66 | o.colorFog.a = clamp(fogDensity,0,1); 67 | 68 | //Cut out polygons 69 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 70 | { 71 | o.pos.w = 0; 72 | } 73 | 74 | 75 | return o; 76 | } 77 | 78 | sampler2D _MainTex; 79 | 80 | float4 frag(v2f IN) : COLOR 81 | { 82 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 83 | half4 color = c*(IN.colorFog.a); 84 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 85 | color.a = c.a; 86 | return color; 87 | } 88 | ENDCG 89 | } 90 | } 91 | } -------------------------------------------------------------------------------- /Assets/Shaders/Trasparent/psx-trasparent-vertexlit.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2425baef6ef2e294b931a912bb14fd29 3 | timeCreated: 1431593670 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/imageEffects.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: af7e20e23b27e8645b43062d4ccd4fb9 3 | folderAsset: yes 4 | timeCreated: 1466069872 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/imageEffects/cPrecision.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | [ExecuteInEditMode] 5 | public class cPrecision : MonoBehaviour 6 | { 7 | private Material material; 8 | public int colorPrecision = 64; 9 | public bool usePalette = false; 10 | public Texture2D palette; 11 | 12 | void Awake() 13 | { 14 | material = new Material(Shader.Find("Hidden/cPrecision")); 15 | } 16 | 17 | void OnRenderImage(RenderTexture source, RenderTexture destination) 18 | { 19 | if (usePalette) 20 | { 21 | material.SetFloat("_usePalette", 1); 22 | } 23 | else 24 | { 25 | material.SetFloat("_usePalette", 0); 26 | } 27 | 28 | material.SetFloat("_Colors", colorPrecision); 29 | material.SetTexture("_Palette", palette); 30 | Graphics.Blit(source, destination, material); 31 | } 32 | } -------------------------------------------------------------------------------- /Assets/Shaders/imageEffects/cPrecision.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9e77671a9d83004e9fe9bcce9a723a7 3 | timeCreated: 1465722245 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Shaders/imageEffects/palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Shaders/imageEffects/palette.png -------------------------------------------------------------------------------- /Assets/Shaders/imageEffects/palette.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d14a2c0423baa614282239d2e57ce6fb 3 | timeCreated: 1465824131 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: 5 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Shaders/psx-unlit.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/unlit" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | } 5 | SubShader{ 6 | Tags{ "RenderType" = "Opaque" } 7 | LOD 200 8 | 9 | Pass{ 10 | Lighting On 11 | CGPROGRAM 12 | 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | #include "UnityCG.cginc" 16 | 17 | struct v2f 18 | { 19 | fixed4 pos : SV_POSITION; 20 | half4 color : COLOR0; 21 | half4 colorFog : COLOR1; 22 | float2 uv_MainTex : TEXCOORD0; 23 | half3 normal : TEXCOORD1; 24 | }; 25 | 26 | float4 _MainTex_ST; 27 | uniform half4 unity_FogStart; 28 | uniform half4 unity_FogEnd; 29 | 30 | v2f vert(appdata_full v) 31 | { 32 | v2f o; 33 | 34 | //Vertex snapping 35 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 36 | float4 vertex = snapToPixel; 37 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 38 | vertex.x = floor(160 * vertex.x) / 160; 39 | vertex.y = floor(120 * vertex.y) / 120; 40 | vertex.xyz *= snapToPixel.w; 41 | o.pos = vertex; 42 | 43 | //Vertex lighting 44 | o.color = v.color*UNITY_LIGHTMODEL_AMBIENT;; 45 | 46 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 47 | 48 | //Affine Texture Mapping 49 | float4 affinePos = vertex;//vertex; 50 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 51 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 52 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 53 | 54 | //Fog 55 | float4 fogColor = unity_FogColor; 56 | 57 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 58 | o.normal.g = fogDensity; 59 | o.normal.b = 1; 60 | 61 | o.colorFog = fogColor; 62 | o.colorFog.a = clamp(fogDensity,0,1); 63 | 64 | //Cut out polygons 65 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 66 | { 67 | o.pos.w = 0; 68 | } 69 | 70 | 71 | return o; 72 | } 73 | 74 | sampler2D _MainTex; 75 | 76 | float4 frag(v2f IN) : COLOR 77 | { 78 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 79 | half4 color = c*(IN.colorFog.a); 80 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 81 | return color; 82 | } 83 | ENDCG 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /Assets/Shaders/psx-unlit.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81e3b2a0a6cd3bb4d9e07391cb051be2 3 | timeCreated: 1431334434 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/psx-unlit_noambient.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/unlit_noambient" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | } 5 | SubShader{ 6 | Tags{ "RenderType" = "Opaque" } 7 | LOD 200 8 | 9 | Pass{ 10 | Lighting On 11 | CGPROGRAM 12 | 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | #include "UnityCG.cginc" 16 | 17 | struct v2f 18 | { 19 | fixed4 pos : SV_POSITION; 20 | half4 color : COLOR0; 21 | half4 colorFog : COLOR1; 22 | float2 uv_MainTex : TEXCOORD0; 23 | half3 normal : TEXCOORD1; 24 | }; 25 | 26 | float4 _MainTex_ST; 27 | uniform half4 unity_FogStart; 28 | uniform half4 unity_FogEnd; 29 | 30 | v2f vert(appdata_full v) 31 | { 32 | v2f o; 33 | 34 | //Vertex snapping 35 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 36 | float4 vertex = snapToPixel; 37 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 38 | vertex.x = floor(160 * vertex.x) / 160; 39 | vertex.y = floor(120 * vertex.y) / 120; 40 | vertex.xyz *= snapToPixel.w; 41 | o.pos = vertex; 42 | 43 | //Vertex lighting 44 | o.color = v.color; 45 | 46 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 47 | 48 | //Affine Texture Mapping 49 | float4 affinePos = vertex;//vertex; 50 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 51 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 52 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 53 | 54 | //Fog 55 | float4 fogColor = unity_FogColor; 56 | 57 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 58 | o.normal.g = fogDensity; 59 | o.normal.b = 1; 60 | 61 | o.colorFog = fogColor; 62 | o.colorFog.a = clamp(fogDensity,0,1); 63 | 64 | //Cut out polygons 65 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 66 | { 67 | o.pos.w = 0; 68 | } 69 | 70 | 71 | return o; 72 | } 73 | 74 | sampler2D _MainTex; 75 | 76 | float4 frag(v2f IN) : COLOR 77 | { 78 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 79 | half4 color = c*(IN.colorFog.a); 80 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 81 | return color; 82 | } 83 | ENDCG 84 | } 85 | } 86 | } -------------------------------------------------------------------------------- /Assets/Shaders/psx-unlit_noambient.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6d0d57d3e1ee64149a8918104b4b01e9 3 | timeCreated: 1440609653 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Shaders/psx-vertexlit.shader: -------------------------------------------------------------------------------- 1 | Shader "psx/vertexlit" { 2 | Properties{ 3 | _MainTex("Base (RGB)", 2D) = "white" {} 4 | } 5 | SubShader{ 6 | Tags { "RenderType" = "Opaque" } 7 | LOD 200 8 | 9 | Pass { 10 | Lighting On 11 | CGPROGRAM 12 | 13 | #pragma vertex vert 14 | #pragma fragment frag 15 | #include "UnityCG.cginc" 16 | 17 | struct v2f 18 | { 19 | fixed4 pos : SV_POSITION; 20 | half4 color : COLOR0; 21 | half4 colorFog : COLOR1; 22 | float2 uv_MainTex : TEXCOORD0; 23 | half3 normal : TEXCOORD1; 24 | }; 25 | 26 | float4 _MainTex_ST; 27 | uniform half4 unity_FogStart; 28 | uniform half4 unity_FogEnd; 29 | 30 | v2f vert(appdata_full v) 31 | { 32 | v2f o; 33 | 34 | //Vertex snapping 35 | float4 snapToPixel = mul(UNITY_MATRIX_MVP,v.vertex); 36 | float4 vertex = snapToPixel; 37 | vertex.xyz = snapToPixel.xyz / snapToPixel.w; 38 | vertex.x = floor(160 * vertex.x) / 160; 39 | vertex.y = floor(120 * vertex.y) / 120; 40 | vertex.xyz *= snapToPixel.w; 41 | o.pos = vertex; 42 | 43 | //Vertex lighting 44 | // o.color = float4(ShadeVertexLights(v.vertex, v.normal), 1.0); 45 | o.color = float4(ShadeVertexLightsFull(v.vertex, v.normal, 4, true), 1.0); 46 | o.color *= v.color; 47 | 48 | float distance = length(mul(UNITY_MATRIX_MV,v.vertex)); 49 | 50 | //Affine Texture Mapping 51 | float4 affinePos = vertex; //vertex; 52 | o.uv_MainTex = TRANSFORM_TEX(v.texcoord, _MainTex); 53 | o.uv_MainTex *= distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 54 | o.normal = distance + (vertex.w*(UNITY_LIGHTMODEL_AMBIENT.a * 8)) / distance / 2; 55 | 56 | //Fog 57 | float4 fogColor = unity_FogColor; 58 | 59 | float fogDensity = (unity_FogEnd - distance) / (unity_FogEnd - unity_FogStart); 60 | o.normal.g = fogDensity; 61 | o.normal.b = 1; 62 | 63 | o.colorFog = fogColor; 64 | o.colorFog.a = clamp(fogDensity,0,1); 65 | 66 | //Cut out polygons 67 | if (distance > unity_FogStart.z + unity_FogColor.a * 255) 68 | { 69 | o.pos.w = 0; 70 | } 71 | 72 | return o; 73 | } 74 | 75 | sampler2D _MainTex; 76 | 77 | float4 frag(v2f IN) : COLOR 78 | { 79 | half4 c = tex2D(_MainTex, IN.uv_MainTex / IN.normal.r)*IN.color; 80 | half4 color = c*(IN.colorFog.a); 81 | color.rgb += IN.colorFog.rgb*(1 - IN.colorFog.a); 82 | return color; 83 | } 84 | ENDCG 85 | } 86 | } 87 | } -------------------------------------------------------------------------------- /Assets/Shaders/psx-vertexlit.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 447fef9edcd98e346b21881ad3e44014 3 | timeCreated: 1431502361 4 | licenseType: Free 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4873958fc4a5db7408276c6bf606eb41 3 | folderAsset: yes 4 | timeCreated: 1439449762 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Textures/Skyboxes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 191e24b864ec25d4097846ce9f6263dd 3 | folderAsset: yes 4 | timeCreated: 1467193686 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Textures/Skyboxes/Cubemap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Textures/Skyboxes/Cubemap.png -------------------------------------------------------------------------------- /Assets/Textures/Skyboxes/Cubemap.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 05ccced8b75eafc43959d7cc9052f9a7 3 | timeCreated: 1467203841 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: 7 | 8900000: generatedCubemap 8 | serializedVersion: 2 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 1 12 | linearTexture: 0 13 | correctGamma: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapFadeDistanceStart: 1 17 | mipMapFadeDistanceEnd: 3 18 | bumpmap: 19 | convertToNormalMap: 0 20 | externalNormalMap: 0 21 | heightScale: 0.25 22 | normalMapFilter: 0 23 | isReadable: 0 24 | grayScaleToAlpha: 0 25 | generateCubemap: 6 26 | cubemapConvolution: 0 27 | cubemapConvolutionSteps: 7 28 | cubemapConvolutionExponent: 1.5 29 | seamlessCubemap: 0 30 | textureFormat: -2 31 | maxTextureSize: 128 32 | textureSettings: 33 | filterMode: 0 34 | aniso: -1 35 | mipBias: -1 36 | wrapMode: 1 37 | nPOTScale: 1 38 | lightmap: 0 39 | rGBM: 0 40 | compressionQuality: 50 41 | allowsAlphaSplitting: 0 42 | spriteMode: 0 43 | spriteExtrude: 1 44 | spriteMeshType: 1 45 | alignment: 0 46 | spritePivot: {x: 0.5, y: 0.5} 47 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 48 | spritePixelsToUnits: 100 49 | alphaIsTransparency: 0 50 | textureType: 3 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | sprites: [] 54 | outline: [] 55 | spritePackingTag: 56 | userData: 57 | assetBundleName: 58 | assetBundleVariant: 59 | -------------------------------------------------------------------------------- /Assets/Textures/tex001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Textures/tex001.jpg -------------------------------------------------------------------------------- /Assets/Textures/tex001.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e8634f5d90a8baf4a95d720e30dcd70c 3 | timeCreated: 1439449762 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: 5 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /Assets/Textures/tex002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Textures/tex002.jpg -------------------------------------------------------------------------------- /Assets/Textures/tex002.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e86722574b5a64a49b4e8162b900fbb1 3 | timeCreated: 1439449762 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: 5 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /Assets/Textures/tex003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Textures/tex003.jpg -------------------------------------------------------------------------------- /Assets/Textures/tex003.jpg.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: db086abaca6eab349bbce1a6bb752ca6 3 | timeCreated: 1439449762 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: 5 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /Assets/Textures/tex004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Textures/tex004.png -------------------------------------------------------------------------------- /Assets/Textures/tex004.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f0992991d374b7641b5d96d8fac59eb2 3 | timeCreated: 1439450532 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: .25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 8 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | spriteMode: 0 41 | spriteExtrude: 1 42 | spriteMeshType: 1 43 | alignment: 0 44 | spritePivot: {x: .5, y: .5} 45 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 46 | spritePixelsToUnits: 100 47 | alphaIsTransparency: 0 48 | textureType: -1 49 | buildTargetSettings: [] 50 | spriteSheet: 51 | sprites: [] 52 | spritePackingTag: 53 | userData: 54 | assetBundleName: 55 | assetBundleVariant: 56 | -------------------------------------------------------------------------------- /Assets/Textures/tex005.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Textures/tex005.png -------------------------------------------------------------------------------- /Assets/Textures/tex005.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c654477b7b1e954683135f643763fd8 3 | timeCreated: 1467279616 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 32 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/Textures/tex006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/Textures/tex006.png -------------------------------------------------------------------------------- /Assets/Textures/tex006.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c030dcc2d62351b408a9ddee8569932d 3 | timeCreated: 1467290921 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 0 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 0 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -2 30 | maxTextureSize: 64 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | textureType: 5 50 | buildTargetSettings: [] 51 | spriteSheet: 52 | sprites: [] 53 | outline: [] 54 | spritePackingTag: 55 | userData: 56 | assetBundleName: 57 | assetBundleVariant: 58 | -------------------------------------------------------------------------------- /Assets/UnityVS/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ef1900d3c75fb094996a6562fbbf39d3 3 | folderAsset: yes 4 | timeCreated: 1466069872 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/UnityVS/Editor/SyntaxTree.VisualStudio.Unity.Messaging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/UnityVS/Editor/SyntaxTree.VisualStudio.Unity.Messaging.dll -------------------------------------------------------------------------------- /Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll -------------------------------------------------------------------------------- /Assets/UnityVS/Editor/UnityVS.VersionSpecific.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 22716428d05535f40a61ed27066e6612 3 | timeCreated: 1440522583 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | userData: 19 | assetBundleName: 20 | assetBundleVariant: 21 | -------------------------------------------------------------------------------- /Assets/rotate.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class rotate : MonoBehaviour { 5 | 6 | // Use this for initialization 7 | void Start () { 8 | 9 | } 10 | 11 | public Vector3 rot = Vector3.zero; 12 | // Update is called once per frame 13 | void Update () { 14 | this.transform.Rotate(rot*Time.deltaTime); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/rotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 10e971bcf4512f54a9beb8c98b0e5300 3 | timeCreated: 1439450256 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/testscene.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/Assets/testscene.unity -------------------------------------------------------------------------------- /Assets/testscene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 37f2a9c05dc9d00458274624ac85965e 3 | timeCreated: 1439450285 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 dsoft20 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 5.3.4f1 2 | m_StandardAssetsVersion: 0 3 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityAdsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/UnityAdsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dsoft20/psx_retroshader/d6754070390529d0b50c3b3bef3d087e731e9e45/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # psx_retroshader 2 | Shaders collection for Unity that "emulates" the rendering style of ps1 3 | 4 | WebPlayer (it's an old build): https://dl.dropboxusercontent.com/u/1050404/psx/psx.html 5 | 6 | You can see it in action here: https://www.youtube.com/watch?v=MxcLA--2v-Y 7 | 8 | ![ScreenShot](http://i.imgur.com/MS7sjt3.png) 9 | ![ScreenShot](http://i.imgur.com/my438QX.gif) 10 | 11 | #Content & usage 12 | psx_retroshader includes 4 shaders, plus a simple posterize image effect (cPrecision.cs): 13 | - unlit 14 | - vertex lit 15 | - trasparent unlit 16 | - trasparent vertex lit 17 | - Reflective shaders (Add & Mult variants) 18 | 19 | Vertex lit shaders now supports spotlights too! 20 | 21 | Example of the posterize shader: 22 | ![ScreenShot](http://i.imgur.com/HE5fxhT.png) 23 | 24 | All shaders supports Fog, polygon cut-out & distortion amount. 25 | - Fog color & distance is driven by Unity fog settings (remember to set as linear fog). 26 | - Polygon cutout is driven by tha alpha channel of Fog Color, it works by cutting every polygon that are greater in distance than fogstart+fogcolor.alpha (fog color is in range 0-1 but is multiplied in the shader by 255) 27 | - Distortion amount is driven by the alpha channel of unity's ambient color, you can adjust it as you please. 28 | 29 | #Warning 30 | Like the original ps1 this shader use affine texture mapping, so if you apply a texture on a large quad you'll see it very distored. 31 | To avoid excessive distortion you have to add triangless to the mesh. 32 | 33 | Example: 34 | 35 | ![ScreenShot](http://i.imgur.com/zC2T1uJ.png) 36 | 37 | As you can see the effect is better when the mesh is subdivided (bottom left mesh) instead of when the mesh have a low poly count (top right mesh) 38 | 39 | -------------------------------------------------------------------------------- /Unity.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | 6 | # Autogenerated VS/MD solution and project files 7 | *.csproj 8 | *.unityproj 9 | *.sln 10 | *.suo 11 | *.tmp 12 | *.user 13 | *.userprefs 14 | *.pidb 15 | *.booproj 16 | 17 | # Unity3D generated meta files 18 | *.pidb.meta 19 | 20 | # Unity3D Generated File On Crash Reports 21 | sysinfo.txt --------------------------------------------------------------------------------