├── .gitignore ├── Assets ├── Editor.meta ├── Editor │ ├── TextureModifier.cs │ └── TextureModifier.cs.meta ├── Test A Default.png ├── Test A Default.png.meta ├── Test A Dither.png ├── Test A Dither.png.meta ├── Test A Original.png ├── Test A Original.png.meta ├── Test B Default.png ├── Test B Default.png.meta ├── Test B Dither.png ├── Test B Dither.png.meta ├── Test B Original.png ├── Test B Original.png.meta ├── Test C Default.png ├── Test C Default.png.meta ├── Test C Dither.png ├── Test C Dither.png.meta ├── Test C Original.png ├── Test C Original.png.meta ├── Test D Default.png ├── Test D Default.png.meta ├── Test D Dither.png ├── Test D Dither.png.meta ├── Test D Original.png └── Test D Original.png.meta ├── ProjectSettings ├── AudioManager.asset ├── DynamicsManager.asset ├── EditorBuildSettings.asset ├── EditorSettings.asset ├── GraphicsSettings.asset ├── InputManager.asset ├── NavMeshLayers.asset ├── NetworkManager.asset ├── Physics2DSettings.asset ├── ProjectSettings.asset ├── QualitySettings.asset ├── TagManager.asset └── TimeManager.asset ├── README.md └── README_ja.md /.gitignore: -------------------------------------------------------------------------------- 1 | [Ll]ibrary/ 2 | [Tt]emp/ 3 | [Oo]bj/ 4 | 5 | # Autogenerated VS/MD solution and project files 6 | *.csproj 7 | *.unityproj 8 | *.sln 9 | *.pidb 10 | *.userprefs 11 | 12 | .DS_Store 13 | -------------------------------------------------------------------------------- /Assets/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 44b7807eb3b254ce2a707c36e3aa359d 3 | folderAsset: yes 4 | DefaultImporter: 5 | userData: 6 | -------------------------------------------------------------------------------- /Assets/Editor/TextureModifier.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections; 4 | 5 | class TextureModifier : AssetPostprocessor 6 | { 7 | void OnPreprocessTexture() 8 | { 9 | var importer = (assetImporter as TextureImporter); 10 | 11 | importer.textureType = TextureImporterType.GUI; 12 | 13 | if (assetPath.EndsWith ("Dither.png")) { 14 | importer.textureFormat = TextureImporterFormat.RGBA32; 15 | } 16 | } 17 | 18 | void OnPostprocessTexture (Texture2D texture) 19 | { 20 | if (!assetPath.EndsWith ("Dither.png")) { 21 | return; 22 | } 23 | 24 | var texw = texture.width; 25 | var texh = texture.height; 26 | 27 | var pixels = texture.GetPixels (); 28 | var offs = 0; 29 | 30 | var k1Per15 = 1.0f / 15.0f; 31 | var k1Per16 = 1.0f / 16.0f; 32 | var k3Per16 = 3.0f / 16.0f; 33 | var k5Per16 = 5.0f / 16.0f; 34 | var k7Per16 = 7.0f / 16.0f; 35 | 36 | for (var y = 0; y < texh; y++) { 37 | for (var x = 0; x < texw; x++) { 38 | float a = pixels [offs].a; 39 | float r = pixels [offs].r; 40 | float g = pixels [offs].g; 41 | float b = pixels [offs].b; 42 | 43 | var a2 = Mathf.Clamp01 (Mathf.Floor (a * 16) * k1Per15); 44 | var r2 = Mathf.Clamp01 (Mathf.Floor (r * 16) * k1Per15); 45 | var g2 = Mathf.Clamp01 (Mathf.Floor (g * 16) * k1Per15); 46 | var b2 = Mathf.Clamp01 (Mathf.Floor (b * 16) * k1Per15); 47 | 48 | var ae = a - a2; 49 | var re = r - r2; 50 | var ge = g - g2; 51 | var be = b - b2; 52 | 53 | pixels [offs].a = a2; 54 | pixels [offs].r = r2; 55 | pixels [offs].g = g2; 56 | pixels [offs].b = b2; 57 | 58 | var n1 = offs + 1; 59 | var n2 = offs + texw - 1; 60 | var n3 = offs + texw; 61 | var n4 = offs + texw + 1; 62 | 63 | if (x < texw - 1) { 64 | pixels [n1].a += ae * k7Per16; 65 | pixels [n1].r += re * k7Per16; 66 | pixels [n1].g += ge * k7Per16; 67 | pixels [n1].b += be * k7Per16; 68 | } 69 | 70 | if (y < texh - 1) { 71 | pixels [n3].a += ae * k5Per16; 72 | pixels [n3].r += re * k5Per16; 73 | pixels [n3].g += ge * k5Per16; 74 | pixels [n3].b += be * k5Per16; 75 | 76 | if (x > 0) { 77 | pixels [n2].a += ae * k3Per16; 78 | pixels [n2].r += re * k3Per16; 79 | pixels [n2].g += ge * k3Per16; 80 | pixels [n2].b += be * k3Per16; 81 | } 82 | 83 | if (x < texw - 1) { 84 | pixels [n4].a += ae * k1Per16; 85 | pixels [n4].r += re * k1Per16; 86 | pixels [n4].g += ge * k1Per16; 87 | pixels [n4].b += be * k1Per16; 88 | } 89 | } 90 | 91 | offs++; 92 | } 93 | } 94 | 95 | texture.SetPixels (pixels); 96 | EditorUtility.CompressTexture (texture, TextureFormat.RGBA4444, TextureCompressionQuality.Best); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /Assets/Editor/TextureModifier.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 18ce0c53ec62643da8e0f3e45032deef 3 | MonoImporter: 4 | serializedVersion: 2 5 | defaultReferences: [] 6 | executionOrder: 0 7 | icon: {instanceID: 0} 8 | userData: 9 | -------------------------------------------------------------------------------- /Assets/Test A Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test A Default.png -------------------------------------------------------------------------------- /Assets/Test A Default.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d8948f757113d449992de8d4505ddae1 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | alphaIsTransparency: 1 34 | textureType: 2 35 | buildTargetSettings: [] 36 | userData: 37 | -------------------------------------------------------------------------------- /Assets/Test A Dither.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test A Dither.png -------------------------------------------------------------------------------- /Assets/Test A Dither.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e452d866f9614483eb6563d1290c84ab 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: 4 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | alphaIsTransparency: 1 34 | textureType: 2 35 | buildTargetSettings: [] 36 | userData: 37 | -------------------------------------------------------------------------------- /Assets/Test A Original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test A Original.png -------------------------------------------------------------------------------- /Assets/Test A Original.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0cdb8473e69f64939bf16c8c35ead571 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | alphaIsTransparency: 1 34 | textureType: 2 35 | buildTargetSettings: [] 36 | userData: 37 | -------------------------------------------------------------------------------- /Assets/Test B Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test B Default.png -------------------------------------------------------------------------------- /Assets/Test B Default.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 648ac393f8c8f4019b7878dba344ae52 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | alphaIsTransparency: 1 34 | textureType: 2 35 | buildTargetSettings: [] 36 | userData: 37 | -------------------------------------------------------------------------------- /Assets/Test B Dither.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test B Dither.png -------------------------------------------------------------------------------- /Assets/Test B Dither.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d3c0e1bad2ed1480c9e7cb7a02eb4ae7 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: 4 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | alphaIsTransparency: 1 34 | textureType: 2 35 | buildTargetSettings: [] 36 | userData: 37 | -------------------------------------------------------------------------------- /Assets/Test B Original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test B Original.png -------------------------------------------------------------------------------- /Assets/Test B Original.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbf007ff146e8421b97bd82f07656548 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | alphaIsTransparency: 1 34 | textureType: 2 35 | buildTargetSettings: [] 36 | userData: 37 | -------------------------------------------------------------------------------- /Assets/Test C Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test C Default.png -------------------------------------------------------------------------------- /Assets/Test C Default.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3942add29a3140309011788126cb8a6 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -1 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | alphaIsTransparency: 1 34 | textureType: 2 35 | buildTargetSettings: [] 36 | userData: 37 | -------------------------------------------------------------------------------- /Assets/Test C Dither.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test C Dither.png -------------------------------------------------------------------------------- /Assets/Test C Dither.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1327b303049f6483f853bf33a44b3917 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: 4 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | alphaIsTransparency: 1 34 | textureType: 2 35 | buildTargetSettings: [] 36 | userData: 37 | -------------------------------------------------------------------------------- /Assets/Test C Original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test C Original.png -------------------------------------------------------------------------------- /Assets/Test C Original.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c8ea74f52558f4e6898e0bb879a6b7f5 3 | TextureImporter: 4 | serializedVersion: 2 5 | mipmaps: 6 | mipMapMode: 0 7 | enableMipMap: 0 8 | linearTexture: 1 9 | correctGamma: 0 10 | fadeOut: 0 11 | borderMipMap: 0 12 | mipMapFadeDistanceStart: 1 13 | mipMapFadeDistanceEnd: 3 14 | bumpmap: 15 | convertToNormalMap: 0 16 | externalNormalMap: 0 17 | heightScale: .25 18 | normalMapFilter: 0 19 | isReadable: 0 20 | grayScaleToAlpha: 0 21 | generateCubemap: 0 22 | seamlessCubemap: 0 23 | textureFormat: -3 24 | maxTextureSize: 1024 25 | textureSettings: 26 | filterMode: -1 27 | aniso: 1 28 | mipBias: -1 29 | wrapMode: 1 30 | nPOTScale: 0 31 | lightmap: 0 32 | compressionQuality: 50 33 | alphaIsTransparency: 1 34 | textureType: 2 35 | buildTargetSettings: [] 36 | userData: 37 | -------------------------------------------------------------------------------- /Assets/Test D Default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test D Default.png -------------------------------------------------------------------------------- /Assets/Test D Default.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ceebaa72d4cab48699c8f48a6f8e592f 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 0 9 | linearTexture: 1 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -1 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: 1 29 | mipBias: -1 30 | wrapMode: 1 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 1 42 | textureType: 2 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/Test D Dither.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test D Dither.png -------------------------------------------------------------------------------- /Assets/Test D Dither.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0fc1e6571ef6d4f839a6eea046925cd1 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 0 9 | linearTexture: 1 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: 4 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: 1 29 | mipBias: -1 30 | wrapMode: 1 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 1 42 | textureType: 2 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /Assets/Test D Original.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/keijiro/unity-dither4444/b4320081fa541fd1767c37798ba963c48be10539/Assets/Test D Original.png -------------------------------------------------------------------------------- /Assets/Test D Original.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fc3c0eaab28d4887b187b45a7467ef3 3 | TextureImporter: 4 | fileIDToRecycleName: {} 5 | serializedVersion: 2 6 | mipmaps: 7 | mipMapMode: 0 8 | enableMipMap: 0 9 | linearTexture: 1 10 | correctGamma: 0 11 | fadeOut: 0 12 | borderMipMap: 0 13 | mipMapFadeDistanceStart: 1 14 | mipMapFadeDistanceEnd: 3 15 | bumpmap: 16 | convertToNormalMap: 0 17 | externalNormalMap: 0 18 | heightScale: .25 19 | normalMapFilter: 0 20 | isReadable: 0 21 | grayScaleToAlpha: 0 22 | generateCubemap: 0 23 | seamlessCubemap: 0 24 | textureFormat: -3 25 | maxTextureSize: 1024 26 | textureSettings: 27 | filterMode: -1 28 | aniso: 1 29 | mipBias: -1 30 | wrapMode: 1 31 | nPOTScale: 0 32 | lightmap: 0 33 | compressionQuality: 50 34 | spriteMode: 0 35 | spriteExtrude: 1 36 | spriteMeshType: 1 37 | alignment: 0 38 | spritePivot: {x: .5, y: .5} 39 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 40 | spritePixelsToUnits: 100 41 | alphaIsTransparency: 1 42 | textureType: 2 43 | buildTargetSettings: [] 44 | spriteSheet: 45 | sprites: [] 46 | spritePackingTag: 47 | userData: 48 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!11 &1 4 | AudioManager: 5 | m_ObjectHideFlags: 0 6 | m_Volume: 1 7 | Rolloff Scale: 1 8 | m_SpeedOfSound: 347 9 | Doppler Factor: 1 10 | Default Speaker Mode: 2 11 | m_DSPBufferSize: 0 12 | m_DisableAudio: 0 13 | -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!55 &1 4 | PhysicsManager: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042, z: 0} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_BounceThreshold: 2 9 | m_SleepVelocity: .150000006 10 | m_SleepAngularVelocity: .140000001 11 | m_MaxAngularVelocity: 7 12 | m_MinPenetrationForPenalty: .00999999978 13 | m_SolverIterationCount: 6 14 | m_RaycastsHitTriggers: 1 15 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 16 | -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1045 &1 4 | EditorBuildSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_Scenes: [] 8 | -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!159 &1 4 | EditorSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_ExternalVersionControlSupport: Meta Files 8 | m_SerializationMode: 2 9 | m_WebSecurityEmulationEnabled: 0 10 | m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d 11 | -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!30 &1 4 | GraphicsSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 2 7 | m_AlwaysIncludedShaders: 8 | - {fileID: 7, guid: 0000000000000000f000000000000000, type: 0} 9 | - {fileID: 10770, guid: 0000000000000000f000000000000000, type: 0} 10 | - {fileID: 10782, guid: 0000000000000000f000000000000000, type: 0} 11 | -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!13 &1 4 | InputManager: 5 | m_ObjectHideFlags: 0 6 | m_Axes: 7 | - serializedVersion: 3 8 | m_Name: Horizontal 9 | descriptiveName: 10 | descriptiveNegativeName: 11 | negativeButton: left 12 | positiveButton: right 13 | altNegativeButton: a 14 | altPositiveButton: d 15 | gravity: 3 16 | dead: .00100000005 17 | sensitivity: 3 18 | snap: 1 19 | invert: 0 20 | type: 0 21 | axis: 0 22 | joyNum: 0 23 | - serializedVersion: 3 24 | m_Name: Vertical 25 | descriptiveName: 26 | descriptiveNegativeName: 27 | negativeButton: down 28 | positiveButton: up 29 | altNegativeButton: s 30 | altPositiveButton: w 31 | gravity: 3 32 | dead: .00100000005 33 | sensitivity: 3 34 | snap: 1 35 | invert: 0 36 | type: 0 37 | axis: 0 38 | joyNum: 0 39 | - serializedVersion: 3 40 | m_Name: Fire1 41 | descriptiveName: 42 | descriptiveNegativeName: 43 | negativeButton: 44 | positiveButton: left ctrl 45 | altNegativeButton: 46 | altPositiveButton: mouse 0 47 | gravity: 1000 48 | dead: .00100000005 49 | sensitivity: 1000 50 | snap: 0 51 | invert: 0 52 | type: 0 53 | axis: 0 54 | joyNum: 0 55 | - serializedVersion: 3 56 | m_Name: Fire2 57 | descriptiveName: 58 | descriptiveNegativeName: 59 | negativeButton: 60 | positiveButton: left alt 61 | altNegativeButton: 62 | altPositiveButton: mouse 1 63 | gravity: 1000 64 | dead: .00100000005 65 | sensitivity: 1000 66 | snap: 0 67 | invert: 0 68 | type: 0 69 | axis: 0 70 | joyNum: 0 71 | - serializedVersion: 3 72 | m_Name: Fire3 73 | descriptiveName: 74 | descriptiveNegativeName: 75 | negativeButton: 76 | positiveButton: left cmd 77 | altNegativeButton: 78 | altPositiveButton: mouse 2 79 | gravity: 1000 80 | dead: .00100000005 81 | sensitivity: 1000 82 | snap: 0 83 | invert: 0 84 | type: 0 85 | axis: 0 86 | joyNum: 0 87 | - serializedVersion: 3 88 | m_Name: Jump 89 | descriptiveName: 90 | descriptiveNegativeName: 91 | negativeButton: 92 | positiveButton: space 93 | altNegativeButton: 94 | altPositiveButton: 95 | gravity: 1000 96 | dead: .00100000005 97 | sensitivity: 1000 98 | snap: 0 99 | invert: 0 100 | type: 0 101 | axis: 0 102 | joyNum: 0 103 | - serializedVersion: 3 104 | m_Name: Mouse X 105 | descriptiveName: 106 | descriptiveNegativeName: 107 | negativeButton: 108 | positiveButton: 109 | altNegativeButton: 110 | altPositiveButton: 111 | gravity: 0 112 | dead: 0 113 | sensitivity: .100000001 114 | snap: 0 115 | invert: 0 116 | type: 1 117 | axis: 0 118 | joyNum: 0 119 | - serializedVersion: 3 120 | m_Name: Mouse Y 121 | descriptiveName: 122 | descriptiveNegativeName: 123 | negativeButton: 124 | positiveButton: 125 | altNegativeButton: 126 | altPositiveButton: 127 | gravity: 0 128 | dead: 0 129 | sensitivity: .100000001 130 | snap: 0 131 | invert: 0 132 | type: 1 133 | axis: 1 134 | joyNum: 0 135 | - serializedVersion: 3 136 | m_Name: Mouse ScrollWheel 137 | descriptiveName: 138 | descriptiveNegativeName: 139 | negativeButton: 140 | positiveButton: 141 | altNegativeButton: 142 | altPositiveButton: 143 | gravity: 0 144 | dead: 0 145 | sensitivity: .100000001 146 | snap: 0 147 | invert: 0 148 | type: 1 149 | axis: 2 150 | joyNum: 0 151 | - serializedVersion: 3 152 | m_Name: Horizontal 153 | descriptiveName: 154 | descriptiveNegativeName: 155 | negativeButton: 156 | positiveButton: 157 | altNegativeButton: 158 | altPositiveButton: 159 | gravity: 0 160 | dead: .189999998 161 | sensitivity: 1 162 | snap: 0 163 | invert: 0 164 | type: 2 165 | axis: 0 166 | joyNum: 0 167 | - serializedVersion: 3 168 | m_Name: Vertical 169 | descriptiveName: 170 | descriptiveNegativeName: 171 | negativeButton: 172 | positiveButton: 173 | altNegativeButton: 174 | altPositiveButton: 175 | gravity: 0 176 | dead: .189999998 177 | sensitivity: 1 178 | snap: 0 179 | invert: 1 180 | type: 2 181 | axis: 1 182 | joyNum: 0 183 | - serializedVersion: 3 184 | m_Name: Fire1 185 | descriptiveName: 186 | descriptiveNegativeName: 187 | negativeButton: 188 | positiveButton: joystick button 0 189 | altNegativeButton: 190 | altPositiveButton: 191 | gravity: 1000 192 | dead: .00100000005 193 | sensitivity: 1000 194 | snap: 0 195 | invert: 0 196 | type: 0 197 | axis: 0 198 | joyNum: 0 199 | - serializedVersion: 3 200 | m_Name: Fire2 201 | descriptiveName: 202 | descriptiveNegativeName: 203 | negativeButton: 204 | positiveButton: joystick button 1 205 | altNegativeButton: 206 | altPositiveButton: 207 | gravity: 1000 208 | dead: .00100000005 209 | sensitivity: 1000 210 | snap: 0 211 | invert: 0 212 | type: 0 213 | axis: 0 214 | joyNum: 0 215 | - serializedVersion: 3 216 | m_Name: Fire3 217 | descriptiveName: 218 | descriptiveNegativeName: 219 | negativeButton: 220 | positiveButton: joystick button 2 221 | altNegativeButton: 222 | altPositiveButton: 223 | gravity: 1000 224 | dead: .00100000005 225 | sensitivity: 1000 226 | snap: 0 227 | invert: 0 228 | type: 0 229 | axis: 0 230 | joyNum: 0 231 | - serializedVersion: 3 232 | m_Name: Jump 233 | descriptiveName: 234 | descriptiveNegativeName: 235 | negativeButton: 236 | positiveButton: joystick button 3 237 | altNegativeButton: 238 | altPositiveButton: 239 | gravity: 1000 240 | dead: .00100000005 241 | sensitivity: 1000 242 | snap: 0 243 | invert: 0 244 | type: 0 245 | axis: 0 246 | joyNum: 0 247 | -------------------------------------------------------------------------------- /ProjectSettings/NavMeshLayers.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!126 &1 4 | NavMeshLayers: 5 | m_ObjectHideFlags: 0 6 | Built-in Layer 0: 7 | name: Default 8 | cost: 1 9 | editType: 2 10 | Built-in Layer 1: 11 | name: Not Walkable 12 | cost: 1 13 | editType: 0 14 | Built-in Layer 2: 15 | name: Jump 16 | cost: 2 17 | editType: 2 18 | User Layer 0: 19 | name: 20 | cost: 1 21 | editType: 3 22 | User Layer 1: 23 | name: 24 | cost: 1 25 | editType: 3 26 | User Layer 2: 27 | name: 28 | cost: 1 29 | editType: 3 30 | User Layer 3: 31 | name: 32 | cost: 1 33 | editType: 3 34 | User Layer 4: 35 | name: 36 | cost: 1 37 | editType: 3 38 | User Layer 5: 39 | name: 40 | cost: 1 41 | editType: 3 42 | User Layer 6: 43 | name: 44 | cost: 1 45 | editType: 3 46 | User Layer 7: 47 | name: 48 | cost: 1 49 | editType: 3 50 | User Layer 8: 51 | name: 52 | cost: 1 53 | editType: 3 54 | User Layer 9: 55 | name: 56 | cost: 1 57 | editType: 3 58 | User Layer 10: 59 | name: 60 | cost: 1 61 | editType: 3 62 | User Layer 11: 63 | name: 64 | cost: 1 65 | editType: 3 66 | User Layer 12: 67 | name: 68 | cost: 1 69 | editType: 3 70 | User Layer 13: 71 | name: 72 | cost: 1 73 | editType: 3 74 | User Layer 14: 75 | name: 76 | cost: 1 77 | editType: 3 78 | User Layer 15: 79 | name: 80 | cost: 1 81 | editType: 3 82 | User Layer 16: 83 | name: 84 | cost: 1 85 | editType: 3 86 | User Layer 17: 87 | name: 88 | cost: 1 89 | editType: 3 90 | User Layer 18: 91 | name: 92 | cost: 1 93 | editType: 3 94 | User Layer 19: 95 | name: 96 | cost: 1 97 | editType: 3 98 | User Layer 20: 99 | name: 100 | cost: 1 101 | editType: 3 102 | User Layer 21: 103 | name: 104 | cost: 1 105 | editType: 3 106 | User Layer 22: 107 | name: 108 | cost: 1 109 | editType: 3 110 | User Layer 23: 111 | name: 112 | cost: 1 113 | editType: 3 114 | User Layer 24: 115 | name: 116 | cost: 1 117 | editType: 3 118 | User Layer 25: 119 | name: 120 | cost: 1 121 | editType: 3 122 | User Layer 26: 123 | name: 124 | cost: 1 125 | editType: 3 126 | User Layer 27: 127 | name: 128 | cost: 1 129 | editType: 3 130 | User Layer 28: 131 | name: 132 | cost: 1 133 | editType: 3 134 | -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!149 &1 4 | NetworkManager: 5 | m_ObjectHideFlags: 0 6 | m_DebugLevel: 0 7 | m_Sendrate: 15 8 | m_AssetToPrefab: {} 9 | -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!19 &1 4 | Physics2DSettings: 5 | m_ObjectHideFlags: 0 6 | m_Gravity: {x: 0, y: -9.81000042} 7 | m_DefaultMaterial: {fileID: 0} 8 | m_VelocityIterations: 8 9 | m_PositionIterations: 3 10 | m_VelocityThreshold: 1 11 | m_MaxLinearCorrection: .200000003 12 | m_MaxAngularCorrection: 8 13 | m_MaxTranslationSpeed: 100 14 | m_MaxRotationSpeed: 360 15 | m_MinPenetrationForPenalty: .00999999978 16 | m_BaumgarteScale: .200000003 17 | m_BaumgarteTimeOfImpactScale: .75 18 | m_TimeToSleep: .5 19 | m_LinearSleepTolerance: .00999999978 20 | m_AngularSleepTolerance: 2 21 | m_RaycastsHitTriggers: 1 22 | m_RaycastsStartInColliders: 1 23 | m_ChangeStopsCallbacks: 0 24 | m_LayerCollisionMatrix: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 25 | -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!129 &1 4 | PlayerSettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 3 7 | AndroidProfiler: 0 8 | defaultScreenOrientation: 0 9 | targetDevice: 2 10 | targetGlesGraphics: 1 11 | targetResolution: 0 12 | accelerometerFrequency: 60 13 | companyName: DefaultCompany 14 | productName: unity-texture-dither 15 | defaultCursor: {fileID: 0} 16 | cursorHotspot: {x: 0, y: 0} 17 | defaultScreenWidth: 1024 18 | defaultScreenHeight: 768 19 | defaultScreenWidthWeb: 960 20 | defaultScreenHeightWeb: 600 21 | m_RenderingPath: 1 22 | m_MobileRenderingPath: 1 23 | m_ActiveColorSpace: 0 24 | m_MTRendering: 1 25 | m_MobileMTRendering: 0 26 | m_UseDX11: 0 27 | m_Stereoscopic3D: 0 28 | iosShowActivityIndicatorOnLoading: -1 29 | androidShowActivityIndicatorOnLoading: -1 30 | displayResolutionDialog: 1 31 | allowedAutorotateToPortrait: 1 32 | allowedAutorotateToPortraitUpsideDown: 1 33 | allowedAutorotateToLandscapeRight: 1 34 | allowedAutorotateToLandscapeLeft: 1 35 | useOSAutorotation: 1 36 | use32BitDisplayBuffer: 1 37 | use24BitDepthBuffer: 0 38 | defaultIsFullScreen: 1 39 | defaultIsNativeResolution: 1 40 | runInBackground: 0 41 | captureSingleScreen: 0 42 | Override IPod Music: 0 43 | Prepare IOS For Recording: 0 44 | enableHWStatistics: 1 45 | usePlayerLog: 1 46 | stripPhysics: 0 47 | forceSingleInstance: 0 48 | resizableWindow: 0 49 | useMacAppStoreValidation: 0 50 | gpuSkinning: 1 51 | xboxPIXTextureCapture: 0 52 | xboxEnableAvatar: 0 53 | xboxEnableKinect: 0 54 | xboxEnableKinectAutoTracking: 0 55 | xboxEnableFitness: 0 56 | visibleInBackground: 0 57 | macFullscreenMode: 2 58 | d3d9FullscreenMode: 1 59 | d3d11ForceExclusiveMode: 0 60 | xboxSpeechDB: 0 61 | xboxEnableHeadOrientation: 0 62 | xboxEnableGuest: 0 63 | videoMemoryForVertexBuffers: 0 64 | m_SupportedAspectRatios: 65 | 4:3: 1 66 | 5:4: 1 67 | 16:10: 1 68 | 16:9: 1 69 | Others: 1 70 | iPhoneBundleIdentifier: com.Company.ProductName 71 | metroEnableIndependentInputSource: 0 72 | metroEnableLowLatencyPresentationAPI: 0 73 | productGUID: a7055e55f8a724a75b03a91157293732 74 | iPhoneBundleVersion: 1.0 75 | AndroidBundleVersionCode: 1 76 | AndroidMinSdkVersion: 9 77 | AndroidPreferredInstallLocation: 1 78 | aotOptions: 79 | apiCompatibilityLevel: 2 80 | iPhoneStrippingLevel: 0 81 | iPhoneScriptCallOptimization: 0 82 | ForceInternetPermission: 0 83 | ForceSDCardPermission: 0 84 | CreateWallpaper: 0 85 | APKExpansionFiles: 0 86 | StripUnusedMeshComponents: 0 87 | iPhoneSdkVersion: 988 88 | iPhoneTargetOSVersion: 10 89 | uIPrerenderedIcon: 0 90 | uIRequiresPersistentWiFi: 0 91 | uIStatusBarHidden: 1 92 | uIExitOnSuspend: 0 93 | uIStatusBarStyle: 0 94 | iPhoneSplashScreen: {fileID: 0} 95 | iPhoneHighResSplashScreen: {fileID: 0} 96 | iPhoneTallHighResSplashScreen: {fileID: 0} 97 | iPhone47inSplashScreen: {fileID: 0} 98 | iPhone55inPortraitSplashScreen: {fileID: 0} 99 | iPhone55inLandscapeSplashScreen: {fileID: 0} 100 | iPadPortraitSplashScreen: {fileID: 0} 101 | iPadHighResPortraitSplashScreen: {fileID: 0} 102 | iPadLandscapeSplashScreen: {fileID: 0} 103 | iPadHighResLandscapeSplashScreen: {fileID: 0} 104 | AndroidTargetDevice: 0 105 | AndroidSplashScreenScale: 0 106 | AndroidKeystoreName: 107 | AndroidKeyaliasName: 108 | resolutionDialogBanner: {fileID: 0} 109 | m_BuildTargetIcons: [] 110 | m_BuildTargetBatching: [] 111 | webPlayerTemplate: APPLICATION:Default 112 | m_TemplateCustomTags: {} 113 | locationUsageDescription: 114 | XboxTitleId: 115 | XboxImageXexPath: 116 | XboxSpaPath: 117 | XboxGenerateSpa: 0 118 | XboxDeployKinectResources: 0 119 | XboxSplashScreen: {fileID: 0} 120 | xboxEnableSpeech: 0 121 | xboxAdditionalTitleMemorySize: 0 122 | xboxDeployKinectHeadOrientation: 0 123 | xboxDeployKinectHeadPosition: 0 124 | ps3TitleConfigPath: 125 | ps3DLCConfigPath: 126 | ps3ThumbnailPath: 127 | ps3BackgroundPath: 128 | ps3SoundPath: 129 | ps3TrophyCommId: 130 | ps3NpCommunicationPassphrase: 131 | ps3TrophyPackagePath: 132 | ps3BootCheckMaxSaveGameSizeKB: 128 133 | ps3TrophyCommSig: 134 | ps3SaveGameSlots: 1 135 | ps3TrialMode: 0 136 | psp2Splashimage: {fileID: 0} 137 | psp2LiveAreaGate: {fileID: 0} 138 | psp2LiveAreaBackround: {fileID: 0} 139 | psp2NPTrophyPackPath: 140 | psp2NPCommsID: 141 | psp2NPCommsPassphrase: 142 | psp2NPCommsSig: 143 | psp2ParamSfxPath: 144 | psp2PackagePassword: 145 | psp2DLCConfigPath: 146 | psp2ThumbnailPath: 147 | psp2BackgroundPath: 148 | psp2SoundPath: 149 | psp2TrophyCommId: 150 | psp2TrophyPackagePath: 151 | psp2PackagedResourcesPath: 152 | flashStrippingLevel: 2 153 | spritePackerPolicy: 154 | scriptingDefineSymbols: {} 155 | metroPackageName: unity-texture-dither 156 | metroPackageLogo: 157 | metroPackageLogo140: 158 | metroPackageLogo180: 159 | metroPackageLogo240: 160 | metroPackageVersion: 161 | metroCertificatePath: 162 | metroCertificatePassword: 163 | metroCertificateSubject: 164 | metroCertificateIssuer: 165 | metroCertificateNotAfter: 0000000000000000 166 | metroApplicationDescription: unity-texture-dither 167 | metroStoreTileLogo80: 168 | metroStoreTileLogo: 169 | metroStoreTileLogo140: 170 | metroStoreTileLogo180: 171 | metroStoreTileWideLogo80: 172 | metroStoreTileWideLogo: 173 | metroStoreTileWideLogo140: 174 | metroStoreTileWideLogo180: 175 | metroStoreTileSmallLogo80: 176 | metroStoreTileSmallLogo: 177 | metroStoreTileSmallLogo140: 178 | metroStoreTileSmallLogo180: 179 | metroStoreSmallTile80: 180 | metroStoreSmallTile: 181 | metroStoreSmallTile140: 182 | metroStoreSmallTile180: 183 | metroStoreLargeTile80: 184 | metroStoreLargeTile: 185 | metroStoreLargeTile140: 186 | metroStoreLargeTile180: 187 | metroStoreSplashScreenImage: 188 | metroStoreSplashScreenImage140: 189 | metroStoreSplashScreenImage180: 190 | metroPhoneAppIcon: 191 | metroPhoneAppIcon140: 192 | metroPhoneAppIcon240: 193 | metroPhoneSmallTile: 194 | metroPhoneSmallTile140: 195 | metroPhoneSmallTile240: 196 | metroPhoneMediumTile: 197 | metroPhoneMediumTile140: 198 | metroPhoneMediumTile240: 199 | metroPhoneWideTile: 200 | metroPhoneWideTile140: 201 | metroPhoneWideTile240: 202 | metroPhoneSplashScreenImage: 203 | metroPhoneSplashScreenImage140: 204 | metroPhoneSplashScreenImage240: 205 | metroTileShortName: 206 | metroCommandLineArgsFile: 207 | metroTileShowName: 0 208 | metroMediumTileShowName: 0 209 | metroLargeTileShowName: 0 210 | metroWideTileShowName: 0 211 | metroDefaultTileSize: 1 212 | metroTileForegroundText: 1 213 | metroTileBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 214 | metroSplashScreenBackgroundColor: {r: 0, g: 0, b: 0, a: 1} 215 | metroSplashScreenUseBackgroundColor: 0 216 | metroCapabilities: {} 217 | metroUnprocessedPlugins: [] 218 | metroCompilationOverrides: 1 219 | blackberryDeviceAddress: 220 | blackberryDevicePassword: 221 | blackberryTokenPath: 222 | blackberryTokenExires: 223 | blackberryTokenAuthor: 224 | blackberryTokenAuthorId: 225 | blackberryAuthorId: 226 | blackberryCskPassword: 227 | blackberrySaveLogPath: 228 | blackberryAuthorIdOveride: 0 229 | blackberrySharedPermissions: 0 230 | blackberryCameraPermissions: 0 231 | blackberryGPSPermissions: 0 232 | blackberryDeviceIDPermissions: 0 233 | blackberryMicrophonePermissions: 0 234 | blackberryGamepadSupport: 0 235 | blackberryBuildId: 0 236 | blackberryLandscapeSplashScreen: {fileID: 0} 237 | blackberryPortraitSplashScreen: {fileID: 0} 238 | blackberrySquareSplashScreen: {fileID: 0} 239 | tizenProductDescription: 240 | tizenProductURL: 241 | tizenCertificatePath: 242 | tizenCertificatePassword: 243 | tizenGPSPermissions: 0 244 | tizenMicrophonePermissions: 0 245 | stvDeviceAddress: 246 | firstStreamedLevelWithResources: 0 247 | unityRebuildLibraryVersion: 9 248 | unityForwardCompatibleVersion: 39 249 | unityStandardAssetsVersion: 0 250 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!47 &1 4 | QualitySettings: 5 | m_ObjectHideFlags: 0 6 | serializedVersion: 5 7 | m_CurrentQuality: 3 8 | m_QualitySettings: 9 | - serializedVersion: 2 10 | name: Fastest 11 | pixelLightCount: 0 12 | shadows: 0 13 | shadowResolution: 0 14 | shadowProjection: 1 15 | shadowCascades: 1 16 | shadowDistance: 15 17 | blendWeights: 1 18 | textureQuality: 1 19 | anisotropicTextures: 0 20 | antiAliasing: 0 21 | softParticles: 0 22 | softVegetation: 0 23 | vSyncCount: 0 24 | lodBias: .300000012 25 | maximumLODLevel: 0 26 | particleRaycastBudget: 4 27 | excludedTargetPlatforms: [] 28 | - serializedVersion: 2 29 | name: Fast 30 | pixelLightCount: 0 31 | shadows: 0 32 | shadowResolution: 0 33 | shadowProjection: 1 34 | shadowCascades: 1 35 | shadowDistance: 20 36 | blendWeights: 2 37 | textureQuality: 0 38 | anisotropicTextures: 0 39 | antiAliasing: 0 40 | softParticles: 0 41 | softVegetation: 0 42 | vSyncCount: 0 43 | lodBias: .400000006 44 | maximumLODLevel: 0 45 | particleRaycastBudget: 16 46 | excludedTargetPlatforms: [] 47 | - serializedVersion: 2 48 | name: Simple 49 | pixelLightCount: 1 50 | shadows: 1 51 | shadowResolution: 0 52 | shadowProjection: 1 53 | shadowCascades: 1 54 | shadowDistance: 20 55 | blendWeights: 2 56 | textureQuality: 0 57 | anisotropicTextures: 1 58 | antiAliasing: 0 59 | softParticles: 0 60 | softVegetation: 0 61 | vSyncCount: 0 62 | lodBias: .699999988 63 | maximumLODLevel: 0 64 | particleRaycastBudget: 64 65 | excludedTargetPlatforms: [] 66 | - serializedVersion: 2 67 | name: Good 68 | pixelLightCount: 2 69 | shadows: 2 70 | shadowResolution: 1 71 | shadowProjection: 1 72 | shadowCascades: 2 73 | shadowDistance: 40 74 | blendWeights: 2 75 | textureQuality: 0 76 | anisotropicTextures: 1 77 | antiAliasing: 0 78 | softParticles: 0 79 | softVegetation: 1 80 | vSyncCount: 1 81 | lodBias: 1 82 | maximumLODLevel: 0 83 | particleRaycastBudget: 256 84 | excludedTargetPlatforms: [] 85 | - serializedVersion: 2 86 | name: Beautiful 87 | pixelLightCount: 3 88 | shadows: 2 89 | shadowResolution: 2 90 | shadowProjection: 1 91 | shadowCascades: 2 92 | shadowDistance: 70 93 | blendWeights: 4 94 | textureQuality: 0 95 | anisotropicTextures: 2 96 | antiAliasing: 2 97 | softParticles: 1 98 | softVegetation: 1 99 | vSyncCount: 1 100 | lodBias: 1.5 101 | maximumLODLevel: 0 102 | particleRaycastBudget: 1024 103 | excludedTargetPlatforms: [] 104 | - serializedVersion: 2 105 | name: Fantastic 106 | pixelLightCount: 4 107 | shadows: 2 108 | shadowResolution: 2 109 | shadowProjection: 1 110 | shadowCascades: 4 111 | shadowDistance: 150 112 | blendWeights: 4 113 | textureQuality: 0 114 | anisotropicTextures: 2 115 | antiAliasing: 2 116 | softParticles: 1 117 | softVegetation: 1 118 | vSyncCount: 1 119 | lodBias: 2 120 | maximumLODLevel: 0 121 | particleRaycastBudget: 4096 122 | excludedTargetPlatforms: [] 123 | m_PerPlatformDefaultQuality: 124 | Android: 2 125 | BlackBerry: 2 126 | FlashPlayer: 3 127 | GLES Emulation: 3 128 | PS3: 3 129 | Standalone: 3 130 | WP8: 3 131 | Web: 3 132 | Wii: 3 133 | Windows Store Apps: 3 134 | XBOX360: 3 135 | iPhone: 2 136 | -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!78 &1 4 | TagManager: 5 | tags: 6 | - 7 | Builtin Layer 0: Default 8 | Builtin Layer 1: TransparentFX 9 | Builtin Layer 2: Ignore Raycast 10 | Builtin Layer 3: 11 | Builtin Layer 4: Water 12 | Builtin Layer 5: 13 | Builtin Layer 6: 14 | Builtin Layer 7: 15 | User Layer 8: 16 | User Layer 9: 17 | User Layer 10: 18 | User Layer 11: 19 | User Layer 12: 20 | User Layer 13: 21 | User Layer 14: 22 | User Layer 15: 23 | User Layer 16: 24 | User Layer 17: 25 | User Layer 18: 26 | User Layer 19: 27 | User Layer 20: 28 | User Layer 21: 29 | User Layer 22: 30 | User Layer 23: 31 | User Layer 24: 32 | User Layer 25: 33 | User Layer 26: 34 | User Layer 27: 35 | User Layer 28: 36 | User Layer 29: 37 | User Layer 30: 38 | User Layer 31: 39 | -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!5 &1 4 | TimeManager: 5 | m_ObjectHideFlags: 0 6 | Fixed Timestep: .0199999996 7 | Maximum Allowed Timestep: .333333343 8 | m_TimeScale: 1 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | unity-dither4444 2 | ================ 3 | 4 | This example shows how to make a high-quality 16-bit color texture in Unity. 5 | 6 | Abstract 7 | -------- 8 | 9 | Unity supports 16-bit color as a texture color format, however it introduces significant color banding. 10 | 11 | ![Image A (original)](http://keijiro.github.io/unity-dither4444/a-original.png)![Image A (default)](http://keijiro.github.io/unity-dither4444/a-default.png) 12 | 13 | ![Image B (original)](http://keijiro.github.io/unity-dither4444/b-original.png)![Image B (default)](http://keijiro.github.io/unity-dither4444/b-default.png) 14 | 15 | *(Left: original image, Right: 16-bit converted image)* 16 | 17 | It’s mainly because of lack of dither -- Unity simply quantizes the image to 16-bit without any fancy algorithms. It can be improved by dithering the image before quantization. This example does it in the AssetPostProcessor script. 18 | 19 | ![Image A (original)](http://keijiro.github.io/unity-dither4444/a-original.png)![Image A (dithered)](http://keijiro.github.io/unity-dither4444/a-dither.png) 20 | 21 | ![Image B (original)](http://keijiro.github.io/unity-dither4444/b-original.png)![Image B (dithered)](http://keijiro.github.io/unity-dither4444/b-dither.png) 22 | 23 | *(Left: original image, Right: 16-bit image with dithering)* 24 | 25 | Usage 26 | ----- 27 | 28 | Add “Dither” to the end of the filename, or import an image with the “Dither” suffix. The AssetPostProcessor script automatically detects and convert it. You can change the behavior by modifying the script. See [the script](https://github.com/keijiro/unity-dither4444/blob/master/Assets/Editor/TextureModifier.cs) for further details. 29 | 30 | License 31 | ------- 32 | 33 | The script files in this repository are in the public domain. You can copy and paste it without permission or attribution. 34 | -------------------------------------------------------------------------------- /README_ja.md: -------------------------------------------------------------------------------- 1 | Unity で高品質な減色を実現する 2 | ============================== 3 | 4 | 概要 5 | ---- 6 | 7 | Unity ではテクスチャ画像のフォーマットに 16 bit color を指定すると単純なビットシフトによる減色が行われますが、これは画質の大きな劣化を招きます。この文書では、ディザリングアルゴリズムを使ってこれを改善する方法を紹介します。 8 | 9 | 動機 10 | ---- 11 | 12 | Android では機種に依存せず使用可能なテクスチャ圧縮アルゴリズムとして ETC1 が採用されていますが、この ETC1 ではアルファチャンネルを用いることができません。そのため、Android においてアルファを用いたい場合には、画質の悪化を我慢して 16 bit color を適用するか、メモリ不足のリスクを承知で 32 bit color を適用するか、どちらか2択を強いられることになります。 13 | 14 | (もちろん、GPU コア毎に特化されたテクスチャ圧縮形式を適用することも可能ですが、機種毎に個別のパッケージを用意する手間を考えると、なかなか採用しづらいというのが実際のところです) 15 | 16 | Unity において 16 bit color の画質が著しく悪化する原因は、その減色方式の単純さにあります。単なるビットシフトにより各色成分の下位 4 bit を切り捨てるという処理が行われるため、繊細なグラデーションはすべて潰れて顕著なマッハバンドを残すことになります。 17 | 18 | たとえ単純なアルゴリズムでも、何らかのディザリングを適用すれば、そこまで悪い画質にはならないはずです。そこで、テクスチャインポート時に簡単なディザリングを適用するスクリプトを組んでみることにしました。 19 | 20 | デフォルトの 16 bit 減色例 21 | -------------------------- 22 | 23 | 左がオリジナルの画像、右が 16 bit 減色後の画像です。グラデーションが潰れてマッハバンドが現れているのが見えます。肌の色も若干異なって見えます。 24 | 25 | ![Image A (original)](http://keijiro.github.io/unity-dither4444/a-original.png)![Image A (default)](http://keijiro.github.io/unity-dither4444/a-default.png) 26 | 27 | もう一例挙げます。 28 | 29 | ![Image B (original)](http://keijiro.github.io/unity-dither4444/b-original.png)![Image B (default)](http://keijiro.github.io/unity-dither4444/b-default.png) 30 | 31 | 32 | ディザリング適用時の 16 bit 減色例 33 | ---------------------------------- 34 | 35 | この文書で提示する方法によりディザリングを適用した例です。左がオリジナルの画像、右が 16 bit 減色後の画像です。若干ジャリジャリとしたノイズが混ざる形となっていますが、全体としてマッハバンドは軽減されていることが分かります。 36 | 37 | ![Image A (original)](http://keijiro.github.io/unity-dither4444/a-original.png)![Image A (dithered)](http://keijiro.github.io/unity-dither4444/a-dither.png) 38 | 39 | ![Image B (original)](http://keijiro.github.io/unity-dither4444/b-original.png)![Image B (dithered)](http://keijiro.github.io/unity-dither4444/b-dither.png) 40 | 41 | ![Image C (original)](http://keijiro.github.io/unity-dither4444/c-original.png)![Image C (dithered)](http://keijiro.github.io/unity-dither4444/c-dither.png) 42 | 43 | ![Image D (original)](http://keijiro.github.io/unity-dither4444/d-original.png)![Image D (dithered)](http://keijiro.github.io/unity-dither4444/d-dither.png) 44 | 45 | スクリプトの説明 46 | ---------------- 47 | 48 | 減色処理のメインとなるのは [Assets/Editor/TextureModifier.cs](https://github.com/keijiro/unity-dither4444/blob/master/Assets/Editor/TextureModifier.cs) です。実装の詳細については、こちらのスクリプトを参照してください。 49 | 50 | このスクリプトでは、AssetPostprocessor を用いてテクスチャのインポート処理をオーバーライドしています。今回のサンプルでは、とりあえずファイル名の末尾が “Dither” となっていた場合に、自動的にディザリングを施すようにしました。 51 | 52 | 大まかには次のような実装になっています。 53 | 54 | #### OnPreprocessTexture 55 | 56 | テクスチャのインポートが開始される前に呼ばれる関数です。ここでは、ターゲットがディザリング対象のテクスチャであった場合に、テクスチャのフォーマットを RGBA32 に変更する処理を行っています。これは、後に続く処理の中で減色前のデータを正しく拾うために必要になります。 57 | 58 | また、このサンプルではすべてのテクスチャが GUI 用途であるため、テクスチャタイプを “GUI” に変更する処理も行っています。これは簡便化のために挟んでいるだけで、本来は不要な処理です。 59 | 60 | #### OnPostprocessTexture 61 | 62 | テクスチャのインポートが終了した後に呼ばれる関数です。ここでは、ターゲットがディザリング対象のテクスチャであった場合に、以下の処理を行います。 63 | 64 | 1. ディザリングの適用。 65 | 2. RGBA4444 形式への変換。 66 | 67 | まず最初にディザリングを行います。元画像を float color (Color クラス)列で取得し、ディザリングと 4 bit クオンタイズ(量子化)を行います。この時点で各色成分は 4 bit 精度にまで落ちていますが、結果は float color のままターゲットのテクスチャへ再格納します。 68 | 69 | 次に、ターゲットのテクスチャを RGBA4444 の 16 bit テクスチャ形式へ変換します。これには EditorUtility.CompressTexture を用います。これにより、結果的にディザリング適用済みの画像が 16 bit 形式で格納されることになります。 70 | 71 | 今後の課題 72 | ---------- 73 | 74 | このサンプルではシンプルな [Floyd-Steinberg のディザリングアルゴリズム](http://en.wikipedia.org/wiki/Floyd–Steinberg_dithering) を用いていますが、このアルゴリズムは必ずしも高品質な結果をもたらしません。もっと複雑なディザリングアルゴリズムを用いることで、より高い品質を得ることができるかもしれません。 75 | 76 | また、単純に RGB 色空間上で処理を行っていることも、結果に悪影響を及ぼしているように思われます。微妙なグラデーション部分に見られる色相の乱れなどは、一時的な色空間の変換を行うことで改善が可能かもしれません。 77 | 78 | 謝辞(テスト画像について) 79 | -------------------------- 80 | 81 | 上でテストに用いている画像 (Test A, Test B) は[テラシュールウェア](http://terasur.blog.fc2.com)さんよりご提供いただいたものです。 **この画像を検証以外に用いることは避けてください。** 82 | 83 | スクリプトの使用について 84 | ------------------------ 85 | 86 | このプロジェクトに含まれるスクリプト (TextureModifier.cs) は商用・非商用を問わず自由に利用して構いません。 87 | --------------------------------------------------------------------------------