├── .gitignore ├── Assets ├── Ocias.meta └── Ocias │ ├── PixelArtCamera.meta │ └── PixelArtCamera │ ├── BilinearSharp.mat │ ├── BilinearSharp.mat.meta │ ├── BilinearSharp.shader │ ├── BilinearSharp.shader.meta │ ├── Editor.meta │ ├── Editor │ ├── PixelArtCameraEditor.cs │ └── PixelArtCameraEditor.cs.meta │ ├── Example.meta │ ├── Example │ ├── CameraPan.cs │ ├── CameraPan.cs.meta │ ├── Pixel Art Example.unity │ ├── Pixel Art Example.unity.meta │ ├── PixelArtDemoDust.mat │ ├── PixelArtDemoDust.mat.meta │ ├── PixelArtDemoRotatingBlock.mat │ ├── PixelArtDemoRotatingBlock.mat.meta │ ├── PressStart2P.ttf │ ├── PressStart2P.ttf.meta │ ├── RandomRotate.cs │ ├── RandomRotate.cs.meta │ ├── SixtyFPS.cs │ ├── SixtyFPS.cs.meta │ ├── Textures.meta │ ├── Textures │ │ ├── anna.png │ │ ├── anna.png.meta │ │ ├── bottle.png │ │ ├── bottle.png.meta │ │ ├── brickwall.png │ │ ├── brickwall.png.meta │ │ ├── dirtpath.png │ │ ├── dirtpath.png.meta │ │ ├── dust.png │ │ ├── dust.png.meta │ │ ├── easel.png │ │ ├── easel.png.meta │ │ ├── fence.png │ │ ├── fence.png.meta │ │ ├── grass.png │ │ ├── grass.png.meta │ │ ├── grasstuft.png │ │ ├── grasstuft.png.meta │ │ ├── mailbox.png │ │ ├── mailbox.png.meta │ │ ├── marnie.png │ │ ├── marnie.png.meta │ │ ├── paintbox.png │ │ ├── paintbox.png.meta │ │ ├── purpleflower.png │ │ ├── purpleflower.png.meta │ │ ├── shadow.png │ │ └── shadow.png.meta │ ├── TileSpin.cs │ └── TileSpin.cs.meta │ ├── PixelArtCamera.cs │ ├── PixelArtCamera.cs.meta │ ├── PixelArtDiffuse.shader │ ├── PixelArtDiffuse.shader.meta │ ├── PixelArtFont.mat │ ├── PixelArtFont.mat.meta │ ├── PixelArtFont.shader │ ├── PixelArtFont.shader.meta │ ├── PixelArtParticle.shader │ ├── PixelArtParticle.shader.meta │ ├── PixelArtSprite.mat │ ├── PixelArtSprite.mat.meta │ ├── PixelArtSprite.shader │ ├── PixelArtSprite.shader.meta │ ├── PixelArtSpriteDiffuse.mat │ ├── PixelArtSpriteDiffuse.mat.meta │ ├── PixelArtSpriteDiffuse.shader │ ├── PixelArtSpriteDiffuse.shader.meta │ ├── PixelArtUI.mat │ ├── PixelArtUI.mat.meta │ ├── PixelArtUI.shader │ ├── PixelArtUI.shader.meta │ ├── README.txt │ └── README.txt.meta ├── Packages └── manifest.json ├── 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 └── UnityConnectSettings.asset ├── README.MD ├── UnityPackageManager ├── Project │ ├── manifest.json │ └── manifest.json.meta └── manifest.json └── UnityPixelArtCamera.sublime-project /.gitignore: -------------------------------------------------------------------------------- 1 | /[Ll]ibrary/ 2 | /[Tt]emp/ 3 | /[Oo]bj/ 4 | /[Bb]uild/ 5 | /[Bb]uilds/ 6 | /Assets/AssetStoreTools* 7 | 8 | # Autogenerated VS/MD/Consulo solution and project files 9 | ExportedObj/ 10 | .consulo/ 11 | *.csproj 12 | *.unityproj 13 | *.sln 14 | *.suo 15 | *.tmp 16 | *.user 17 | *.userprefs 18 | *.pidb 19 | *.booproj 20 | *.svd 21 | 22 | 23 | # Unity3D generated meta files 24 | *.pidb.meta 25 | 26 | # Unity3D Generated File On Crash Reports 27 | sysinfo.txt 28 | 29 | # Builds 30 | *.apk 31 | *.unitypackage 32 | 33 | UnityPixelArtCamera.sublime-workspace 34 | *.sublime-workspace 35 | -------------------------------------------------------------------------------- /Assets/Ocias.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 672223a37e13b45a193906a7875ad932 3 | folderAsset: yes 4 | timeCreated: 1510737184 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f5ff74e5faf5e44fabd5829e84914ceb 3 | folderAsset: yes 4 | timeCreated: 1510737196 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/BilinearSharp.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/BilinearSharp.mat -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/BilinearSharp.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6de3dd6a2ea7941c6aa915f6353a2a98 3 | timeCreated: 1517442353 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/BilinearSharp.shader: -------------------------------------------------------------------------------- 1 | Shader "Hidden/BilinearSharp" 2 | { 3 | Properties 4 | { 5 | _MainTex ("Texture", 2D) = "white" {} 6 | _DestinationResolution ("Destination Resolution", Vector) = (0,0,0,0) 7 | } 8 | SubShader 9 | { 10 | Tags { "RenderType"="Opaque" } 11 | 12 | Cull Off 13 | Lighting Off 14 | ZWrite Off 15 | ZTest Always 16 | 17 | Pass 18 | { 19 | CGPROGRAM 20 | #pragma vertex vert 21 | #pragma fragment frag 22 | 23 | #include "UnityCG.cginc" 24 | 25 | struct appdata 26 | { 27 | float4 vertex : POSITION; 28 | float2 uv : TEXCOORD0; 29 | }; 30 | 31 | struct v2f 32 | { 33 | float2 uv : TEXCOORD0; 34 | float2 precalc_texel : TEXCOORD1; 35 | float2 precalc_scale : TEXCOORD2; 36 | float2 region_range : TEXCOORD3; 37 | float4 vertex : SV_POSITION; 38 | }; 39 | 40 | sampler2D _MainTex; 41 | float4 _DestinationResolution; 42 | float4 _MainTex_ST; 43 | 44 | v2f vert (appdata v) 45 | { 46 | v2f o; 47 | o.vertex = UnityObjectToClipPos(v.vertex); 48 | o.uv = TRANSFORM_TEX(v.uv, _MainTex); 49 | float2 inputResolution = _ScreenParams.xy; 50 | o.precalc_texel = o.uv * inputResolution; 51 | o.precalc_scale = max(floor(_DestinationResolution / inputResolution), float2(1.0, 1.0)) * 1.5; // multiply to match expected sharpness 52 | o.region_range = 0.5 - 0.5 / o.precalc_scale; 53 | return o; 54 | } 55 | 56 | fixed4 frag (v2f i) : SV_Target 57 | { 58 | float2 s = frac(i.precalc_texel); 59 | 60 | 61 | float2 center_dist = s - 0.5; 62 | float2 f = (center_dist - clamp(center_dist, -i.region_range, i.region_range)) * i.precalc_scale + 0.5; 63 | 64 | float2 mod_texel = floor(i.precalc_texel) + f; 65 | 66 | fixed4 col = tex2D(_MainTex, mod_texel / _ScreenParams.xy); 67 | 68 | return col; 69 | } 70 | ENDCG 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/BilinearSharp.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 625a99092834446fdb9bf0c7bc7703f0 3 | timeCreated: 1517442410 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 51903089764694f2aa43f87339791ac8 3 | folderAsset: yes 4 | timeCreated: 1510738345 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Editor/PixelArtCameraEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections; 4 | 5 | [CustomEditor(typeof(PixelArtCamera))] 6 | public class PixelArtCameraEditor : Editor { 7 | SerializedProperty pixels; 8 | SerializedProperty pixelsPerUnit; 9 | SerializedProperty smooth; 10 | SerializedProperty forceSquarePixels; 11 | 12 | SerializedProperty screenResolution; 13 | SerializedProperty upscaledResolution; 14 | SerializedProperty internalResolution; 15 | SerializedProperty finalBlitStretch; 16 | 17 | SerializedProperty mainCamera; 18 | SerializedProperty mainCanvas; 19 | 20 | SerializedProperty requireStencilBuffer; 21 | 22 | SerializedProperty pixelAspectRatio; 23 | SerializedProperty windowboxing; 24 | SerializedProperty integerScaleOnly; 25 | 26 | void OnEnable () { 27 | pixels = serializedObject.FindProperty("pixels"); 28 | pixelsPerUnit = serializedObject.FindProperty("pixelsPerUnit"); 29 | smooth = serializedObject.FindProperty("smooth"); 30 | forceSquarePixels = serializedObject.FindProperty("forceSquarePixels"); 31 | screenResolution = serializedObject.FindProperty("screenResolution"); 32 | upscaledResolution = serializedObject.FindProperty("upscaledResolution"); 33 | internalResolution = serializedObject.FindProperty("internalResolution"); 34 | finalBlitStretch = serializedObject.FindProperty("finalBlitStretch"); 35 | mainCamera = serializedObject.FindProperty("mainCamera"); 36 | mainCanvas = serializedObject.FindProperty("mainCanvas"); 37 | requireStencilBuffer = serializedObject.FindProperty("requireStencilBuffer"); 38 | 39 | pixelAspectRatio = serializedObject.FindProperty("pixelAspectRatio"); 40 | windowboxing = serializedObject.FindProperty("windowboxing"); 41 | integerScaleOnly = serializedObject.FindProperty("integerScaleOnly"); 42 | } 43 | 44 | public override void OnInspectorGUI() { 45 | serializedObject.Update(); 46 | 47 | //GUILayout.Label ("Smooth"); 48 | DrawDefaultInspector (); 49 | pixels.vector2IntValue = EditorGUILayout.Vector2IntField("Target Pixel Dimensions", pixels.vector2IntValue); 50 | pixelsPerUnit.floatValue = EditorGUILayout.FloatField("Pixels Per Unit", pixelsPerUnit.floatValue); 51 | smooth.boolValue = EditorGUILayout.Toggle("Smooth", smooth.boolValue); 52 | forceSquarePixels.boolValue = EditorGUILayout.Toggle("Force Square Pixels", forceSquarePixels.boolValue); 53 | requireStencilBuffer.boolValue = EditorGUILayout.Toggle("Require Stencil Buffer (For Masks)", requireStencilBuffer.boolValue); 54 | EditorGUILayout.LabelField("Screen: " + screenResolution.vector2IntValue.x + "×" + screenResolution.vector2IntValue.y); 55 | EditorGUILayout.LabelField("Pixel Resolution: " + internalResolution.vector2IntValue.x + "×" + internalResolution.vector2IntValue.y); 56 | EditorGUILayout.LabelField("Upscaled Resolution: " + upscaledResolution.vector2IntValue.x + "×" + upscaledResolution.vector2IntValue.y); 57 | Vector2 pixelSize = Vector2.zero; 58 | pixelSize.x = (float)screenResolution.vector2IntValue.x / (float)internalResolution.vector2IntValue.x / finalBlitStretch.vector2Value.x; 59 | pixelSize.y = (float)screenResolution.vector2IntValue.y / (float)internalResolution.vector2IntValue.y / finalBlitStretch.vector2Value.y; 60 | EditorGUILayout.LabelField("Pixel Scale: " + pixelSize.x + "×" + pixelSize.y); 61 | EditorGUILayout.LabelField(""); 62 | EditorGUILayout.LabelField("Experimental Features"); 63 | pixelAspectRatio.vector2Value = EditorGUILayout.Vector2Field("Pixel Aspect Ratio", pixelAspectRatio.vector2Value); 64 | windowboxing.boolValue = EditorGUILayout.Toggle("Windowboxing", windowboxing.boolValue); 65 | integerScaleOnly.boolValue = EditorGUILayout.Toggle(" ^ Integer Scale Only", integerScaleOnly.boolValue); 66 | 67 | serializedObject.ApplyModifiedProperties (); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Editor/PixelArtCameraEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 59722d18e41e041a49bb2c99368e18cd 3 | timeCreated: 1510738528 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27c5e5f8b5ecf4320af8e9d4633e91e8 3 | folderAsset: yes 4 | timeCreated: 1511084155 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/CameraPan.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class CameraPan : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | StartCoroutine(Pan()); 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | 15 | } 16 | 17 | IEnumerator Pan () { 18 | while (true) { 19 | yield return new WaitForSeconds(2.0f); 20 | while(transform.position.x < 1.0f) { 21 | transform.Translate(0.2f * Time.deltaTime, 0, 0); 22 | yield return null; 23 | } 24 | yield return new WaitForSeconds(2.0f); 25 | while(transform.position.x > 0.0f) { 26 | transform.Translate(-0.2f * Time.deltaTime, 0, 0); 27 | yield return null; 28 | } 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/CameraPan.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b1a063a8256014c0fb55d77c095b0e73 3 | timeCreated: 1511086494 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Pixel Art Example.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Pixel Art Example.unity -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Pixel Art Example.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0f8781f301334af6a7b1440a504bbde 3 | timeCreated: 1511084145 4 | licenseType: Free 5 | DefaultImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/PixelArtDemoDust.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/PixelArtDemoDust.mat -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/PixelArtDemoDust.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 801160194334e4f04bb08e92ff20256a 3 | timeCreated: 1511090737 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/PixelArtDemoRotatingBlock.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/PixelArtDemoRotatingBlock.mat -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/PixelArtDemoRotatingBlock.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 543faade507ea49cbb826484d9917b31 3 | timeCreated: 1511082644 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/PressStart2P.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/PressStart2P.ttf -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/PressStart2P.ttf.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47f8085ba1e314f25bf3c6a3aa857d40 3 | timeCreated: 1511084865 4 | licenseType: Free 5 | TrueTypeFontImporter: 6 | externalObjects: {} 7 | serializedVersion: 4 8 | fontSize: 8 9 | forceTextureCase: -1 10 | characterSpacing: 0 11 | characterPadding: 1 12 | includeFontData: 1 13 | fontName: Press Start 2P 14 | fontNames: 15 | - Press Start 2P 16 | fallbackFontReferences: [] 17 | customCharacters: 18 | fontRenderingMode: 2 19 | ascentCalculationMode: 1 20 | useLegacyBoundsCalculation: 0 21 | userData: 22 | assetBundleName: 23 | assetBundleVariant: 24 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/RandomRotate.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class RandomRotate : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | transform.Rotate(230.43f * Time.deltaTime * Random.value, 150.52f * Time.deltaTime * Random.value, 40.34f * Time.deltaTime * Random.value); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/RandomRotate.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 36d11a04b6374480f97bdea4b767cc45 3 | timeCreated: 1511245595 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/SixtyFPS.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class SixtyFPS : MonoBehaviour { 4 | void Start () { 5 | Application.targetFrameRate = 60; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/SixtyFPS.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d5d43829a5cb44dd48b4abb4ff2ac759 3 | timeCreated: 1507532780 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a97f0fa1f9aef4606a9b117539083934 3 | folderAsset: yes 4 | timeCreated: 1511243498 5 | licenseType: Free 6 | DefaultImporter: 7 | externalObjects: {} 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/anna.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/anna.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/anna.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4fb78a3f5adee45a6b63f72a5215fde2 3 | timeCreated: 1511237341 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: 1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/bottle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/bottle.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/bottle.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7fc045d5b1c7a49b89d11b409406336b 3 | timeCreated: 1511240358 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/brickwall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/brickwall.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/brickwall.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7b1d6310f70ea483594cf8612e496295 3 | timeCreated: 1511237617 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/dirtpath.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/dirtpath.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/dirtpath.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4f79e49824e71452396787fa3931b6cd 3 | timeCreated: 1511237840 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/dust.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/dust.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2ee2a433addd048c9b95149488d8ab2e 3 | timeCreated: 1511090719 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/easel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/easel.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/easel.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 16702ca1dc17a4c68aedb54879065eea 3 | timeCreated: 1511237616 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/fence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/fence.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/fence.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b58e9f7e9e844c4b8f6386576655f00 3 | timeCreated: 1511237401 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/grass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/grass.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/grass.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9026862a7943147c2a68a58366a71907 3 | timeCreated: 1511237840 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/grasstuft.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/grasstuft.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/grasstuft.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2f1d3005f31a74c21923f91cfbbdc7d0 3 | timeCreated: 1511237840 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/mailbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/mailbox.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/mailbox.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c2da3c52717642fca25a3daa2f68527 3 | timeCreated: 1511237496 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/marnie.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/marnie.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/marnie.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e770bbd7cc4f14a7baa3260e4f2236ae 3 | timeCreated: 1511237268 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/paintbox.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/paintbox.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/paintbox.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cfc4b91ca7937409c840f76833de77a0 3 | timeCreated: 1511237617 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/purpleflower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/purpleflower.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/purpleflower.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d117df14461684bf3a627c05a65ff031 3 | timeCreated: 1511237840 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/shadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/Example/Textures/shadow.png -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/Textures/shadow.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c6af031f4ed3a404cb386e0de65ddd91 3 | timeCreated: 1511237496 4 | licenseType: Free 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | externalObjects: {} 8 | serializedVersion: 4 9 | mipmaps: 10 | mipMapMode: 0 11 | enableMipMap: 0 12 | sRGBTexture: 1 13 | linearTexture: 0 14 | fadeOut: 0 15 | borderMipMap: 0 16 | mipMapsPreserveCoverage: 0 17 | alphaTestReferenceValue: 0.5 18 | mipMapFadeDistanceStart: 1 19 | mipMapFadeDistanceEnd: 3 20 | bumpmap: 21 | convertToNormalMap: 0 22 | externalNormalMap: 0 23 | heightScale: 0.25 24 | normalMapFilter: 0 25 | isReadable: 0 26 | grayScaleToAlpha: 0 27 | generateCubemap: 6 28 | cubemapConvolution: 0 29 | seamlessCubemap: 0 30 | textureFormat: 1 31 | maxTextureSize: 2048 32 | textureSettings: 33 | serializedVersion: 2 34 | filterMode: -1 35 | aniso: -1 36 | mipBias: -1 37 | wrapU: 1 38 | wrapV: 1 39 | wrapW: 1 40 | nPOTScale: 0 41 | lightmap: 0 42 | compressionQuality: 50 43 | spriteMode: 1 44 | spriteExtrude: 1 45 | spriteMeshType: 1 46 | alignment: 0 47 | spritePivot: {x: 0.5, y: 0.5} 48 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 49 | spritePixelsToUnits: 100 50 | alphaUsage: 1 51 | alphaIsTransparency: 1 52 | spriteTessellationDetail: -1 53 | textureType: 8 54 | textureShape: 1 55 | maxTextureSizeSet: 0 56 | compressionQualitySet: 0 57 | textureFormatSet: 0 58 | platformSettings: 59 | - buildTarget: DefaultTexturePlatform 60 | maxTextureSize: 2048 61 | resizeAlgorithm: 0 62 | textureFormat: -1 63 | textureCompression: 0 64 | compressionQuality: 50 65 | crunchedCompression: 0 66 | allowsAlphaSplitting: 0 67 | overridden: 0 68 | - buildTarget: Standalone 69 | maxTextureSize: 2048 70 | resizeAlgorithm: 0 71 | textureFormat: -1 72 | textureCompression: 0 73 | compressionQuality: 50 74 | crunchedCompression: 0 75 | allowsAlphaSplitting: 0 76 | overridden: 0 77 | - buildTarget: iPhone 78 | maxTextureSize: 2048 79 | resizeAlgorithm: 0 80 | textureFormat: -1 81 | textureCompression: 0 82 | compressionQuality: 50 83 | crunchedCompression: 0 84 | allowsAlphaSplitting: 0 85 | overridden: 0 86 | - buildTarget: Android 87 | maxTextureSize: 2048 88 | resizeAlgorithm: 0 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | physicsShape: [] 100 | spritePackingTag: 101 | userData: 102 | assetBundleName: 103 | assetBundleVariant: 104 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/TileSpin.cs: -------------------------------------------------------------------------------- 1 | using System.Collections; 2 | using System.Collections.Generic; 3 | using UnityEngine; 4 | 5 | public class TileSpin : MonoBehaviour { 6 | 7 | // Use this for initialization 8 | void Start () { 9 | 10 | } 11 | 12 | // Update is called once per frame 13 | void Update () { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/Example/TileSpin.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ca1e83497fff94baaa526c6162c9534e 3 | timeCreated: 1511087026 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtCamera.cs: -------------------------------------------------------------------------------- 1 | // Ppppperfect pixel art rendering!! version 2 2 | // By Alexander Ocias 3 | // https://ocias.com 4 | 5 | using UnityEngine; 6 | using UnityEngine.UI; 7 | 8 | [ExecuteInEditMode] 9 | public class PixelArtCamera : MonoBehaviour { 10 | [HideInInspector] public Vector2Int screenResolution; 11 | [HideInInspector] public Vector2Int internalResolution; 12 | [HideInInspector] public Vector2Int upscaledResolution; 13 | [HideInInspector] public bool smooth = false; 14 | [HideInInspector] public bool forceSquarePixels = false; 15 | [HideInInspector] public Vector2Int pixels = new Vector2Int(1080/12, 1920/12); 16 | [HideInInspector] public float pixelsPerUnit = 100f; 17 | [HideInInspector] public bool requireStencilBuffer = false; 18 | [HideInInspector] public Vector2 pixelAspectRatio = Vector2.one; 19 | [HideInInspector] public bool windowboxing = false; //Maybe implement this later? 20 | [HideInInspector] public bool integerScaleOnly = false; //Maybe implement this later? 21 | public bool useUpscaleShader = false; 22 | 23 | public Material upscaleMaterial; 24 | 25 | RenderTexture rt; 26 | 27 | Rect viewportRect; 28 | 29 | float targetAspectRatio; 30 | float currentAspectRatio; 31 | 32 | [HideInInspector] public Vector2 finalBlitStretch = Vector2.one; 33 | 34 | public Camera mainCamera; 35 | public Canvas mainCanvas; 36 | 37 | // Use this for initialization 38 | void Start () { 39 | SetupRenderTexture(); 40 | } 41 | 42 | void Reset () { 43 | // Try to connect everything automatically on first attach 44 | mainCamera = Camera.main; 45 | GameObject canvasObj = GameObject.Find("Canvas"); 46 | if (canvasObj != null) { 47 | mainCanvas = canvasObj.GetComponent(); 48 | } 49 | Material bilinearUpscaleMat = new Material(Shader.Find("Hidden/BilinearSharp")); 50 | if (bilinearUpscaleMat != null) { 51 | upscaleMaterial = bilinearUpscaleMat; 52 | upscaleMaterial.SetVector("_DestinationResolution", new Vector4(Screen.width, Screen.height, 0, 0)); 53 | useUpscaleShader = true; 54 | } 55 | 56 | } 57 | 58 | public void SetupRenderTexture () { 59 | // Try to connect missing pieces 60 | if (mainCamera == null) { 61 | mainCamera = Camera.main; 62 | } 63 | if (mainCanvas == null) { 64 | GameObject canvasObj = GameObject.Find("Canvas"); 65 | if (canvasObj != null) { 66 | mainCanvas = canvasObj.GetComponent(); 67 | } 68 | } 69 | // prevent 0-size rendertextures, just in case 70 | if (pixels.x == 0 || pixels.y == 0) { 71 | return; 72 | } 73 | 74 | if (rt != null) { 75 | rt.Release(); 76 | } 77 | 78 | screenResolution.x = Screen.width; 79 | screenResolution.y = Screen.height; 80 | 81 | float pixelAspect = 1; 82 | if (pixelAspectRatio.x > 0 && pixelAspectRatio.y > 0) { 83 | pixelAspect = pixelAspectRatio.x / pixelAspectRatio.y; 84 | } 85 | 86 | targetAspectRatio = (float)pixels.x / (float)pixels.y * pixelAspect; //1.5 87 | currentAspectRatio = (float)Screen.width / (float)Screen.height; // 1.777778 88 | 89 | 90 | internalResolution.x = pixels.x; 91 | internalResolution.y = pixels.y; 92 | 93 | // Figure out best pixel resolution for aspect ratio we're on 94 | if (currentAspectRatio != targetAspectRatio) { 95 | if (windowboxing) { 96 | // Leave internal res alone 97 | } else if (currentAspectRatio > targetAspectRatio) { 98 | // Wider screen 99 | internalResolution.x = (int)Mathf.Round((float)pixels.y * currentAspectRatio / pixelAspect); 100 | } else { 101 | // Taller screen 102 | internalResolution.y = (int)Mathf.Round((float)pixels.x / currentAspectRatio * pixelAspect); 103 | } 104 | } 105 | 106 | 107 | // Determine viewport rect 108 | float vWidth = 1f; 109 | float vHeight = 1f; 110 | if (windowboxing) { 111 | int scaleMultiple = Mathf.FloorToInt((float)Screen.width / (float)internalResolution.x); 112 | if (currentAspectRatio > targetAspectRatio) { 113 | vWidth = targetAspectRatio / currentAspectRatio; 114 | 115 | if (integerScaleOnly) { 116 | float proportion = (float)scaleMultiple * internalResolution.y / Screen.height; 117 | vWidth *= proportion; 118 | vHeight *= proportion; 119 | } 120 | 121 | viewportRect = new Rect((1f - vWidth) / 2f,(1f - vHeight) / 2f,vWidth,vHeight); 122 | 123 | 124 | 125 | } else { 126 | vHeight = currentAspectRatio / targetAspectRatio; 127 | 128 | if (integerScaleOnly) { 129 | float proportion = (float)scaleMultiple * internalResolution.x / Screen.width; 130 | vWidth *= proportion; 131 | vHeight *= proportion; 132 | } 133 | 134 | viewportRect = new Rect((1f - vWidth) / 2f,(1f - vHeight) / 2f,vWidth,vHeight); 135 | } 136 | 137 | } else { 138 | viewportRect = new Rect(0,0,1f,1f); 139 | } 140 | 141 | // Determine scale to keep pixels square 142 | finalBlitStretch = Vector2.one; 143 | if (windowboxing) { 144 | 145 | } else if (forceSquarePixels) { 146 | float internalResAspect = (float)internalResolution.x / (float)internalResolution.y; 147 | if (currentAspectRatio != targetAspectRatio) { 148 | if (currentAspectRatio > targetAspectRatio) { 149 | // Wider screen 150 | finalBlitStretch.x = (currentAspectRatio / internalResAspect); 151 | } else { 152 | // Taller screen 153 | finalBlitStretch.y = (internalResAspect / currentAspectRatio); 154 | } 155 | } 156 | } 157 | 158 | // Configure canvas properly to match camera 159 | if (mainCanvas != null) { 160 | mainCanvas.renderMode = RenderMode.ScreenSpaceCamera; 161 | mainCanvas.worldCamera = mainCamera; 162 | CanvasScaler scaler = mainCanvas.GetComponent(); 163 | scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize; 164 | //scaler.referenceResolution = new Vector2(pixels.x, pixels.y); 165 | scaler.screenMatchMode = CanvasScaler.ScreenMatchMode.Expand; 166 | scaler.referencePixelsPerUnit = pixelsPerUnit; 167 | 168 | // If we're stretching to a non-square pixel ratio, we need to make sure the canvas scaler keeps our pixel per unit ratio 169 | Vector2 pixelSize; 170 | pixelSize.x = (float)screenResolution.x / (float)internalResolution.x; 171 | pixelSize.y = (float)screenResolution.y / (float)internalResolution.y; 172 | scaler.referenceResolution = new Vector2((float)pixels.x * pixelSize.x/pixelSize.y, (float)pixels.y); 173 | if (windowboxing) { 174 | scaler.referenceResolution = new Vector2((float)pixels.x, (float)pixels.y); 175 | } 176 | } 177 | 178 | // Make sure our camera projection fits our resolution 179 | mainCamera.orthographicSize = internalResolution.y / 2f / pixelsPerUnit; 180 | Shader.SetGlobalFloat("PIXELS_PER_UNIT", pixelsPerUnit); 181 | 182 | // rt = new RenderTexture(internalResolution.x, internalResolution.y, 16, RenderTextureFormat.ARGB32); 183 | 184 | // if (smooth) { 185 | // rt.filterMode = FilterMode.Bilinear; 186 | // } else { 187 | // rt.filterMode = FilterMode.Point; 188 | // } 189 | // rt.Create(); 190 | } 191 | 192 | void OnPreRender() { 193 | if ((float)Screen.width / (float)Screen.height != currentAspectRatio) { 194 | SetupRenderTexture(); 195 | } 196 | rt = RenderTexture.GetTemporary(internalResolution.x, internalResolution.y, 16, RenderTextureFormat.ARGB32); 197 | if (smooth || useUpscaleShader) { 198 | rt.filterMode = FilterMode.Bilinear; 199 | } else { 200 | rt.filterMode = FilterMode.Point; 201 | } 202 | // if (windowboxing) { 203 | // rt.filterMode = FilterMode.Point; 204 | // } 205 | if (requireStencilBuffer) { 206 | rt.depth = 32; 207 | } 208 | if (mainCamera != null) { 209 | // Render to our small internal texture 210 | mainCamera.targetTexture = rt; 211 | } 212 | mainCamera.rect = new Rect(0,0,1f,1f); 213 | } 214 | void OnPostRender() { 215 | if (mainCamera == null) { 216 | return; 217 | } 218 | mainCamera.rect = viewportRect; 219 | // null the targettexture so we can blit to the screen 220 | mainCamera.targetTexture = null; 221 | 222 | /*if (windowboxing) { 223 | // find suitable scale 224 | int scaleMultiple = Mathf.FloorToInt((float)Screen.width / (float)internalResolution.x); 225 | upscaledResolution.x = internalResolution.x * scaleMultiple; 226 | upscaledResolution.y = internalResolution.y * scaleMultiple; 227 | Vector2 stretch = new Vector2(1f/((float)upscaledResolution.x/(float)Screen.width), 1f/((float)upscaledResolution.y/(float)Screen.height)); 228 | Graphics.Blit(rt, null, stretch, (stretch - Vector2.one) / -2f); 229 | // Graphics.Blit(rt, null, new Vector2(upscaledResolution.x / (float)Screen.width, upscaledResolution.y / (float)Screen.height), new Vector2(0f, 0f)); 230 | } else */if (smooth) { 231 | Graphics.Blit(rt, null, finalBlitStretch, (finalBlitStretch - Vector2.one) / -2f); 232 | } else if (useUpscaleShader) { 233 | upscaleMaterial.SetVector("_DestinationResolution", new Vector4(Screen.width, Screen.height, 0, 0)); 234 | Graphics.Blit(rt, null, upscaleMaterial); 235 | } else { 236 | // draw to buffer at least as big as the screen 237 | int scaleMultiple = Mathf.CeilToInt((float)Screen.width / (float)internalResolution.x); 238 | upscaledResolution.x = internalResolution.x * scaleMultiple; 239 | upscaledResolution.y = internalResolution.y * scaleMultiple; 240 | RenderTexture largeRt = RenderTexture.GetTemporary(upscaledResolution.x, upscaledResolution.y); 241 | Graphics.Blit(rt, largeRt); 242 | 243 | // Scale down to screen 244 | Graphics.Blit(largeRt, null, finalBlitStretch, (finalBlitStretch - Vector2.one) / -2f); 245 | RenderTexture.ReleaseTemporary(largeRt); 246 | } 247 | RenderTexture.ReleaseTemporary(rt); 248 | 249 | } 250 | } 251 | 252 | 253 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtCamera.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f88f1386dd63147198d003daff00d37d 3 | timeCreated: 1507434680 4 | licenseType: Free 5 | MonoImporter: 6 | externalObjects: {} 7 | serializedVersion: 2 8 | defaultReferences: [] 9 | executionOrder: 0 10 | icon: {instanceID: 0} 11 | userData: 12 | assetBundleName: 13 | assetBundleVariant: 14 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtDiffuse.shader: -------------------------------------------------------------------------------- 1 | // Simplified Diffuse shader. Differences from regular Diffuse one: 2 | // - no Main Color 3 | // - fully supports only 1 directional light. Other lights can affect it, but it will be per-vertex/SH. 4 | 5 | Shader "Ocias/Pixel Art Diffuse" { 6 | Properties { 7 | _MainTex ("Base (RGB)", 2D) = "white" {} 8 | } 9 | SubShader { 10 | Tags { "RenderType"="Opaque" } 11 | LOD 150 12 | 13 | CGPROGRAM 14 | #pragma surface surf Lambert vertex:vert noforwardadd 15 | 16 | sampler2D _MainTex; 17 | 18 | struct Input { 19 | float2 uv_MainTex; 20 | }; 21 | 22 | inline float4 ViewSpacePixelSnap (float4 pos) { 23 | 24 | float2 halfScreenRes = _ScreenParams.xy * 0.5f; 25 | 26 | // // View space Pixel Snapping 27 | float2 pixelPos = floor(pos * halfScreenRes + 1 / halfScreenRes) / halfScreenRes; // put back in that half pixel offset when you're done 28 | pos.xy = pixelPos; 29 | 30 | // Odd resolution handling 31 | // float2 odd = _ScreenParams.xy % 2; 32 | // pos.x += odd.x * 0.5 / halfScreenRes.x; 33 | // pos.y += odd.y * 0.5 / halfScreenRes.y; 34 | 35 | return pos; 36 | } 37 | 38 | inline float4 WorldSpacePixelSnap (float4 pos) { 39 | 40 | //float ppu = _PixelsPerUnit; 41 | float zoom = 1/(unity_CameraProjection[1][1]); 42 | float ppu = _ScreenParams.y / zoom / 2; 43 | 44 | pos = mul(unity_ObjectToWorld, pos); 45 | 46 | // World space Pixel Snapping 47 | pos = floor(pos * ppu + 1 / ppu) / ppu; 48 | // Adjust to pixel relative to camera position 49 | float3 snappedCameraPosition = floor(_WorldSpaceCameraPos * ppu + 1 / ppu) / ppu; 50 | float3 cameraSubpixelOffset = snappedCameraPosition - _WorldSpaceCameraPos; 51 | pos.x -= cameraSubpixelOffset.x; 52 | pos.y -= cameraSubpixelOffset.y; 53 | // Odd resolution handling 54 | float2 odd = round(_ScreenParams.xy) % 2; 55 | pos.x += odd.x * 0.5 / ppu; 56 | pos.y += odd.y * 0.5 / ppu; 57 | 58 | pos = mul(unity_WorldToObject, pos); 59 | 60 | return pos; 61 | } 62 | 63 | void vert (inout appdata_full v) { 64 | // Offset position based on distance from camera to nearest pixel 65 | // float zoom = 1/(unity_CameraProjection[1][1]); 66 | // float ppu = _ScreenParams.y / zoom / 2; 67 | // float3 snappedCameraPosition = floor(_WorldSpaceCameraPos * ppu + 1 / ppu) / ppu; 68 | // float3 cameraSubpixelOffset = snappedCameraPosition - _WorldSpaceCameraPos; 69 | // v.vertex.x -= cameraSubpixelOffset.x; 70 | // v.vertex.y -= cameraSubpixelOffset.y; 71 | 72 | v.vertex = WorldSpacePixelSnap(v.vertex); 73 | } 74 | 75 | void surf (Input IN, inout SurfaceOutput o) { 76 | fixed4 c = tex2D(_MainTex, IN.uv_MainTex); 77 | o.Albedo = c.rgb; 78 | o.Alpha = c.a; 79 | } 80 | ENDCG 81 | } 82 | 83 | Fallback "Mobile/VertexLit" 84 | } 85 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtDiffuse.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e0e91e72f6a604b3983f1d9b9ab52d89 3 | timeCreated: 1511082470 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtFont.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/PixelArtFont.mat -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtFont.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3fae287eca4054e00930b010e4580ea3 3 | timeCreated: 1511082109 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtFont.shader: -------------------------------------------------------------------------------- 1 | // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' 2 | 3 | Shader "Ocias/Pixel Art Font" { 4 | Properties { 5 | _MainTex ("Font Texture", 2D) = "white" {} 6 | _Color ("Text Color", Color) = (1,1,1,1) 7 | 8 | _StencilComp ("Stencil Comparison", Float) = 8 9 | _Stencil ("Stencil ID", Float) = 0 10 | _StencilOp ("Stencil Operation", Float) = 0 11 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 12 | _StencilReadMask ("Stencil Read Mask", Float) = 255 13 | 14 | _ColorMask ("Color Mask", Float) = 15 15 | } 16 | 17 | SubShader { 18 | 19 | Tags 20 | { 21 | "Queue"="Transparent" 22 | "IgnoreProjector"="True" 23 | "RenderType"="Transparent" 24 | "PreviewType"="Plane" 25 | } 26 | 27 | Stencil 28 | { 29 | Ref [_Stencil] 30 | Comp [_StencilComp] 31 | Pass [_StencilOp] 32 | ReadMask [_StencilReadMask] 33 | WriteMask [_StencilWriteMask] 34 | } 35 | 36 | Lighting Off 37 | Cull Off 38 | ZTest [unity_GUIZTestMode] 39 | ZWrite Off 40 | Blend SrcAlpha OneMinusSrcAlpha 41 | ColorMask [_ColorMask] 42 | 43 | Pass 44 | { 45 | CGPROGRAM 46 | #pragma vertex vert 47 | #pragma fragment frag 48 | 49 | #include "UnityCG.cginc" 50 | 51 | struct appdata_t { 52 | float4 vertex : POSITION; 53 | fixed4 color : COLOR; 54 | float2 texcoord : TEXCOORD0; 55 | }; 56 | 57 | struct v2f { 58 | float4 vertex : SV_POSITION; 59 | fixed4 color : COLOR; 60 | float2 texcoord : TEXCOORD0; 61 | }; 62 | 63 | sampler2D _MainTex; 64 | uniform float4 _MainTex_ST; 65 | uniform fixed4 _Color; 66 | 67 | inline float4 ViewSpacePixelSnap (float4 pos) { 68 | 69 | float2 halfScreenRes = _ScreenParams.xy * 0.5f; 70 | 71 | // // View space Pixel Snapping 72 | float2 pixelPos = round(pos * halfScreenRes + 1 / halfScreenRes) / halfScreenRes; // put back in that half pixel offset when you're done 73 | pos.xy = pixelPos; 74 | 75 | // Odd resolution handling 76 | float2 odd = _ScreenParams.xy % 2; 77 | pos.x += odd.x * 0.5 / halfScreenRes.x; 78 | pos.y += odd.y * 0.5 / halfScreenRes.y; 79 | 80 | return pos; 81 | } 82 | 83 | v2f vert (appdata_t v) 84 | { 85 | v2f o; 86 | o.vertex = UnityObjectToClipPos(v.vertex); 87 | o.color = v.color * _Color; 88 | o.texcoord = TRANSFORM_TEX(v.texcoord, _MainTex); 89 | #ifdef UNITY_HALF_TEXEL_OFFSET 90 | o.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1); 91 | #endif 92 | o.vertex = ViewSpacePixelSnap(o.vertex); 93 | return o; 94 | } 95 | 96 | fixed4 frag (v2f i) : SV_Target 97 | { 98 | fixed4 col = i.color; 99 | col.a *= tex2D(_MainTex, i.texcoord).a; 100 | clip (col.a - 0.01); 101 | return col; 102 | } 103 | ENDCG 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtFont.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 81779508cd63b403fb890fd1e517d5ab 3 | timeCreated: 1511082053 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtParticle.shader: -------------------------------------------------------------------------------- 1 | // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' 2 | 3 | Shader "Ocias/Pixel Art Particle" { 4 | Properties { 5 | _TintColor ("Tint Color", Color) = (0.5,0.5,0.5,0.5) 6 | _MainTex ("Particle Texture", 2D) = "white" {} 7 | _InvFade ("Soft Particles Factor", Range(0.01,3.0)) = 1.0 8 | } 9 | 10 | Category { 11 | Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 12 | Blend SrcAlpha OneMinusSrcAlpha 13 | AlphaTest Greater .01 14 | ColorMask RGB 15 | Cull Off Lighting Off ZWrite Off 16 | 17 | SubShader { 18 | Pass { 19 | 20 | CGPROGRAM 21 | #pragma vertex vert 22 | #pragma fragment frag 23 | #pragma multi_compile_particles 24 | #pragma multi_compile_fog 25 | 26 | #include "UnityCG.cginc" 27 | 28 | sampler2D _MainTex; 29 | fixed4 _TintColor; 30 | 31 | struct appdata_t { 32 | float4 vertex : POSITION; 33 | fixed4 color : COLOR; 34 | float2 texcoord : TEXCOORD0; 35 | }; 36 | 37 | struct v2f { 38 | float4 vertex : SV_POSITION; 39 | fixed4 color : COLOR; 40 | float2 texcoord : TEXCOORD0; 41 | UNITY_FOG_COORDS(1) 42 | #ifdef SOFTPARTICLES_ON 43 | float4 projPos : TEXCOORD2; 44 | #endif 45 | }; 46 | 47 | float4 _MainTex_ST; 48 | 49 | inline float4 ViewSpacePixelSnap (float4 pos) { 50 | 51 | float2 halfScreenRes = _ScreenParams.xy * 0.5f; 52 | 53 | // // View space Pixel Snapping 54 | float2 pixelPos = floor(pos * halfScreenRes + 1 / halfScreenRes) / halfScreenRes; // put back in that half pixel offset when you're done 55 | pos.xy = pixelPos; 56 | 57 | // Odd resolution handling 58 | float2 odd = _ScreenParams.xy % 2; 59 | pos.x += odd.x * 0.5 / halfScreenRes.x; 60 | pos.y += odd.y * 0.5 / halfScreenRes.y; 61 | 62 | return pos; 63 | } 64 | 65 | v2f vert (appdata_t v) 66 | { 67 | v2f o; 68 | 69 | // Offset position based on distance from camera to nearest pixel 70 | float zoom = 1/(unity_CameraProjection[1][1]); 71 | float ppu = _ScreenParams.y / zoom / 2; 72 | float3 snappedCameraPosition = floor(_WorldSpaceCameraPos * ppu + 1 / ppu) / ppu; 73 | float3 cameraSubpixelOffset = snappedCameraPosition - _WorldSpaceCameraPos; 74 | v.vertex.x -= cameraSubpixelOffset.x; 75 | v.vertex.y -= cameraSubpixelOffset.y; 76 | 77 | o.vertex = UnityObjectToClipPos(v.vertex); 78 | 79 | 80 | 81 | o.color = v.color; 82 | o.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex); 83 | UNITY_TRANSFER_FOG(o,o.vertex); 84 | 85 | o.vertex = ViewSpacePixelSnap(o.vertex); 86 | 87 | return o; 88 | } 89 | 90 | sampler2D_float _CameraDepthTexture; 91 | float _InvFade; 92 | 93 | fixed4 frag (v2f i) : SV_Target 94 | { 95 | #ifdef SOFTPARTICLES_ON 96 | float sceneZ = LinearEyeDepth (SAMPLE_DEPTH_TEXTURE_PROJ(_CameraDepthTexture, UNITY_PROJ_COORD(i.projPos))); 97 | float partZ = i.projPos.z; 98 | float fade = saturate (_InvFade * (sceneZ-partZ)); 99 | i.color.a *= fade; 100 | #endif 101 | 102 | fixed4 col = 2.0f * i.color * _TintColor * tex2D(_MainTex, i.texcoord); 103 | UNITY_APPLY_FOG(i.fogCoord, col); 104 | return col; 105 | } 106 | ENDCG 107 | } 108 | } 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtParticle.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: bf2af1133f53b43f4ba5a2418efb5826 3 | timeCreated: 1511092556 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtSprite.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/PixelArtSprite.mat -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtSprite.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab3f697fb6dc7487dac26bef49137c5b 3 | timeCreated: 1507432351 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtSprite.shader: -------------------------------------------------------------------------------- 1 | // Version 1.0 2 | // By Alexander Ocias 3 | // https://ocias.com 4 | 5 | Shader "Ocias/Pixel Art Sprite" 6 | { 7 | Properties 8 | { 9 | [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} 10 | _Color ("Tint", Color) = (1,1,1,1) 11 | } 12 | 13 | SubShader 14 | { 15 | Tags 16 | { 17 | "Queue"="Transparent" 18 | "IgnoreProjector"="True" 19 | "RenderType"="Transparent" 20 | "PreviewType"="Plane" 21 | "CanUseSpriteAtlas"="True" 22 | } 23 | 24 | Cull Off 25 | Lighting Off 26 | ZWrite Off 27 | Blend One OneMinusSrcAlpha 28 | 29 | Pass 30 | { 31 | CGPROGRAM 32 | #pragma vertex vert 33 | #pragma fragment frag 34 | #include "UnityCG.cginc" 35 | 36 | struct appdata_t 37 | { 38 | float4 vertex : POSITION; 39 | float4 color : COLOR; 40 | float2 texcoord : TEXCOORD0; 41 | }; 42 | 43 | struct v2f 44 | { 45 | float4 vertex : SV_POSITION; 46 | fixed4 color : COLOR; 47 | half2 texcoord : TEXCOORD0; 48 | }; 49 | 50 | fixed4 _Color; 51 | uniform float PIXELS_PER_UNIT; 52 | 53 | inline float4 ViewSpacePixelSnap (float4 pos) { 54 | float pixelSize = _ScreenParams.xy; 55 | float2 halfScreenRes = _ScreenParams.xy * 0.5f; 56 | 57 | // // View space Pixel Snapping 58 | float2 pixelPos = floor(pos * halfScreenRes + 1 / halfScreenRes) / halfScreenRes; // put back in that half pixel offset when you're done 59 | pos.xy = pixelPos; 60 | 61 | // Odd resolution handling 62 | float2 odd = _ScreenParams.xy % 2; 63 | pos.x += odd.x * 0.5 / halfScreenRes.x; 64 | pos.y += odd.y * 0.5 / halfScreenRes.y; 65 | 66 | return pos; 67 | } 68 | 69 | inline float4 WorldSpacePixelSnap (float4 pos) { 70 | 71 | //float ppu = _PixelsPerUnit; 72 | // float zoom = unity_OrthoParams.y; 73 | // float ppu = _ScreenParams.y / zoom / 2; 74 | float ppu = PIXELS_PER_UNIT; 75 | 76 | pos = mul(unity_ObjectToWorld, pos); 77 | 78 | 79 | // World space Pixel Snapping 80 | pos = floor(pos * ppu + 1 / ppu) / ppu; 81 | // Adjust to pixel relative to camera position 82 | // float3 snappedCameraPosition = floor(_WorldSpaceCameraPos * ppu + 1 / ppu) / ppu; 83 | // float3 cameraSubpixelOffset = snappedCameraPosition - _WorldSpaceCameraPos; 84 | // pos.x -= cameraSubpixelOffset.x; 85 | // pos.y -= cameraSubpixelOffset.y; 86 | // Odd resolution handling 87 | float2 odd = _ScreenParams.xy % 2; 88 | pos.x += odd.x * 0.5 / ppu; 89 | pos.y += odd.y * 0.5 / ppu; 90 | 91 | pos = mul(unity_WorldToObject, pos); 92 | 93 | return pos; 94 | } 95 | 96 | 97 | 98 | v2f vert(appdata_t IN) 99 | { 100 | v2f OUT; 101 | 102 | IN.vertex = WorldSpacePixelSnap(IN.vertex); 103 | 104 | // Offset position based on distance from camera to nearest pixel 105 | // float zoom = unity_OrthoParams.y; 106 | // float ppu = _ScreenParams.y / zoom / 2; 107 | float ppu = PIXELS_PER_UNIT; 108 | float3 snappedCameraPosition = floor(_WorldSpaceCameraPos * ppu + 1 / ppu) / ppu; 109 | float3 cameraSubpixelOffset = snappedCameraPosition - _WorldSpaceCameraPos; 110 | IN.vertex.x -= cameraSubpixelOffset.x; 111 | IN.vertex.y -= cameraSubpixelOffset.y; 112 | 113 | OUT.vertex = UnityObjectToClipPos(IN.vertex); 114 | #ifdef UNITY_HALF_TEXEL_OFFSET 115 | OUT.vertex.x -= (float)1 / _ScreenParams.x; 116 | OUT.vertex.y += (float)1 / _ScreenParams.y; 117 | #endif 118 | OUT.texcoord = IN.texcoord; 119 | OUT.color = IN.color * _Color; 120 | 121 | //OUT.vertex = ViewSpacePixelSnap(OUT.vertex); 122 | 123 | 124 | 125 | return OUT; 126 | } 127 | 128 | sampler2D _MainTex; 129 | 130 | fixed4 frag(v2f IN) : SV_Target 131 | { 132 | fixed4 c = tex2D(_MainTex, IN.texcoord) * IN.color; 133 | c.rgb *= c.a; 134 | return c; 135 | } 136 | ENDCG 137 | } 138 | } 139 | } -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtSprite.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3bb988f3b31640feb47123b1191860f 3 | timeCreated: 1524908630 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtSpriteDiffuse.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/PixelArtSpriteDiffuse.mat -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtSpriteDiffuse.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4ae3484d4d6c4b109b6abbcac364a5d 3 | timeCreated: 1527940234 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtSpriteDiffuse.shader: -------------------------------------------------------------------------------- 1 | // Version 1.0 2 | // By Alexander Ocias 3 | // https://ocias.com 4 | 5 | Shader "Ocias/Pixel Art Sprite Diffuse" 6 | { 7 | Properties 8 | { 9 | [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} 10 | _Color ("Tint", Color) = (1,1,1,1) 11 | 12 | } 13 | 14 | SubShader 15 | { 16 | Tags 17 | { 18 | "Queue"="Transparent" 19 | "IgnoreProjector"="True" 20 | "RenderType"="Transparent" 21 | "PreviewType"="Plane" 22 | "CanUseSpriteAtlas"="True" 23 | } 24 | 25 | Cull Off 26 | Lighting Off 27 | ZWrite Off 28 | Blend One OneMinusSrcAlpha 29 | 30 | CGPROGRAM 31 | #pragma surface surf Lambert vertex:vert nofog keepalpha 32 | 33 | sampler2D _MainTex; 34 | fixed4 _Color; 35 | 36 | uniform float PIXELS_PER_UNIT; 37 | 38 | struct Input 39 | { 40 | float2 uv_MainTex; 41 | fixed4 color; 42 | }; 43 | 44 | inline float4 WorldSpacePixelSnap (float4 pos) { 45 | 46 | float ppu = PIXELS_PER_UNIT; 47 | 48 | pos = mul(unity_ObjectToWorld, pos); 49 | 50 | // World space Pixel Snapping 51 | pos = floor(pos * ppu + 1 / ppu) / ppu; 52 | 53 | // Odd resolution handling 54 | float2 odd = trunc(_ScreenParams.xy) % 2; 55 | pos.x += odd.x * 0.5 / ppu; 56 | pos.y += odd.y * 0.5 / ppu; 57 | 58 | pos = mul(unity_WorldToObject, pos); 59 | 60 | return pos; 61 | } 62 | 63 | void vert (inout appdata_full v, out Input o) 64 | { 65 | v.vertex = WorldSpacePixelSnap(v.vertex); 66 | 67 | float ppu = PIXELS_PER_UNIT; 68 | float3 snappedCameraPosition = floor(_WorldSpaceCameraPos * ppu + 1 / ppu) / ppu; 69 | float3 cameraSubpixelOffset = snappedCameraPosition - _WorldSpaceCameraPos; 70 | v.vertex.x -= cameraSubpixelOffset.x; 71 | v.vertex.y -= cameraSubpixelOffset.y; 72 | 73 | UNITY_INITIALIZE_OUTPUT(Input, o); 74 | o.color = v.color * _Color; 75 | } 76 | 77 | void surf (Input IN, inout SurfaceOutput o) 78 | { 79 | fixed4 c = tex2D(_MainTex, IN.uv_MainTex) * IN.color; 80 | o.Albedo = c.rgb * c.a; 81 | o.Alpha = c.a; 82 | } 83 | ENDCG 84 | } 85 | 86 | Fallback "Transparent/VertexLit" 87 | } 88 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtSpriteDiffuse.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b0ae7100ef9af4dec9cc66e110d669f5 3 | timeCreated: 1527940081 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtUI.mat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/Assets/Ocias/PixelArtCamera/PixelArtUI.mat -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtUI.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7039e99ac10c74fe5b31445bbed9a1b1 3 | timeCreated: 1511081240 4 | licenseType: Free 5 | NativeFormatImporter: 6 | externalObjects: {} 7 | mainObjectFileID: 2100000 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtUI.shader: -------------------------------------------------------------------------------- 1 | // Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)' 2 | 3 | Shader "Ocias/PixelArtUI" 4 | { 5 | Properties 6 | { 7 | [PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} 8 | _Color ("Tint", Color) = (1,1,1,1) 9 | 10 | _StencilComp ("Stencil Comparison", Float) = 8 11 | _Stencil ("Stencil ID", Float) = 0 12 | _StencilOp ("Stencil Operation", Float) = 0 13 | _StencilWriteMask ("Stencil Write Mask", Float) = 255 14 | _StencilReadMask ("Stencil Read Mask", Float) = 255 15 | 16 | _ColorMask ("Color Mask", Float) = 15 17 | } 18 | 19 | SubShader 20 | { 21 | Tags 22 | { 23 | "Queue"="Transparent" 24 | "IgnoreProjector"="True" 25 | "RenderType"="Transparent" 26 | "PreviewType"="Plane" 27 | "CanUseSpriteAtlas"="True" 28 | } 29 | 30 | Stencil 31 | { 32 | Ref [_Stencil] 33 | Comp [_StencilComp] 34 | Pass [_StencilOp] 35 | ReadMask [_StencilReadMask] 36 | WriteMask [_StencilWriteMask] 37 | } 38 | 39 | Cull Off 40 | Lighting Off 41 | ZWrite Off 42 | ZTest [unity_GUIZTestMode] 43 | Blend SrcAlpha OneMinusSrcAlpha 44 | ColorMask [_ColorMask] 45 | 46 | Pass 47 | { 48 | CGPROGRAM 49 | #pragma vertex vert 50 | #pragma fragment frag 51 | #include "UnityCG.cginc" 52 | 53 | struct appdata_t 54 | { 55 | float4 vertex : POSITION; 56 | float4 color : COLOR; 57 | float2 texcoord : TEXCOORD0; 58 | }; 59 | 60 | struct v2f 61 | { 62 | float4 vertex : SV_POSITION; 63 | fixed4 color : COLOR; 64 | half2 texcoord : TEXCOORD0; 65 | }; 66 | 67 | fixed4 _Color; 68 | 69 | inline float4 ViewSpacePixelSnap (float4 pos) { 70 | 71 | float2 halfScreenRes = _ScreenParams.xy * 0.5f; 72 | 73 | // // View space Pixel Snapping 74 | float2 pixelPos = round(pos * halfScreenRes + 1 / halfScreenRes) / halfScreenRes; // put back in that half pixel offset when you're done 75 | pos.xy = pixelPos; 76 | 77 | // Odd resolution handling 78 | float2 odd = _ScreenParams.xy % 2; 79 | pos.x += odd.x * 0.5 / halfScreenRes.x; 80 | pos.y += odd.y * 0.5 / halfScreenRes.y; 81 | 82 | return pos; 83 | } 84 | 85 | v2f vert(appdata_t IN) 86 | { 87 | v2f OUT; 88 | 89 | OUT.vertex = UnityObjectToClipPos(IN.vertex); 90 | OUT.texcoord = IN.texcoord; 91 | #ifdef UNITY_HALF_TEXEL_OFFSET 92 | OUT.vertex.xy += (_ScreenParams.zw-1.0)*float2(-1,1); 93 | #endif 94 | OUT.vertex = ViewSpacePixelSnap(OUT.vertex); 95 | OUT.color = IN.color * _Color; 96 | // OUT.color.r = (OUT.vertex.x + 1) / 2; 97 | // OUT.color.g = (OUT.vertex.y + 1) / 2; 98 | return OUT; 99 | } 100 | 101 | sampler2D _MainTex; 102 | 103 | fixed4 frag(v2f IN) : SV_Target 104 | { 105 | half4 color = tex2D(_MainTex, IN.texcoord) * IN.color; 106 | clip (color.a - 0.01); 107 | return color; 108 | } 109 | ENDCG 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/PixelArtUI.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6b14fee4a290a4dc387300643f204476 3 | timeCreated: 1511080699 4 | licenseType: Free 5 | ShaderImporter: 6 | externalObjects: {} 7 | defaultTextures: [] 8 | userData: 9 | assetBundleName: 10 | assetBundleVariant: 11 | -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/README.txt: -------------------------------------------------------------------------------- 1 | Setup 2 | ===== 3 | It’s super easy to get started: 4 | 5 | 1. Put the PixelArtCamera component anywhere in your scene (I recommend on your camera) 6 | 2. Connect the Camera and Canvas in the appropriate fields if they’re not automatically filled in. 7 | 3. Set the resolution on the PixelArtCamera component to your preference (and match the Pixels Per Unit to your texture imports, if you haven’t left it on the default ‘100’.) 8 | 4. Put a material using the ‘Ocias/Pixel Art Sprite’ shader on your sprites. 9 | 10 | That’s it! 11 | 12 | FAQs 13 | ==== 14 | * **Why is my font not displaying correctly?** 15 | 16 | Make sure you configure its import settings for pixel art. Set the asset's font size to the designed value, set the rendering mode to raster, and make sure the text object uses the same font size. 17 | 18 | 19 | * **Why is my world-space canvas not displaying correctly?** 20 | 21 | It may not be matching your game's pixels-per-unit settings. Set the scale of your world-space canvas to (1 / Pixels-per-unit). -------------------------------------------------------------------------------- /Assets/Ocias/PixelArtCamera/README.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3077fb73da29e474d9dfeeb12a54bafe 3 | timeCreated: 1523667246 4 | licenseType: Free 5 | TextScriptImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Packages/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /ProjectSettings/AudioManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/AudioManager.asset -------------------------------------------------------------------------------- /ProjectSettings/ClusterInputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/ClusterInputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/DynamicsManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/DynamicsManager.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorBuildSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/EditorBuildSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/EditorSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/EditorSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/GraphicsSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/GraphicsSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/InputManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/InputManager.asset -------------------------------------------------------------------------------- /ProjectSettings/NavMeshAreas.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/NavMeshAreas.asset -------------------------------------------------------------------------------- /ProjectSettings/NetworkManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/NetworkManager.asset -------------------------------------------------------------------------------- /ProjectSettings/Physics2DSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/Physics2DSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/ProjectSettings.asset -------------------------------------------------------------------------------- /ProjectSettings/ProjectVersion.txt: -------------------------------------------------------------------------------- 1 | m_EditorVersion: 2017.2.0p2 2 | -------------------------------------------------------------------------------- /ProjectSettings/QualitySettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/QualitySettings.asset -------------------------------------------------------------------------------- /ProjectSettings/TagManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/TagManager.asset -------------------------------------------------------------------------------- /ProjectSettings/TimeManager.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/TimeManager.asset -------------------------------------------------------------------------------- /ProjectSettings/UnityConnectSettings.asset: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexanderOcias/UnityPixelArtCamera/824c2b1d363411f0d6af22bc21aeb9f207ae7a6b/ProjectSettings/UnityConnectSettings.asset -------------------------------------------------------------------------------- /README.MD: -------------------------------------------------------------------------------- 1 | Unity Pixel Art Camera 2 | ====================== 3 | Solves the key issues with pixel art rendering in Unity with no headaches. 4 | 5 | 1. Displays sprites without distortion 6 | 2. Enforces a consistent pixel size 7 | 3. Conforms to a pixel grid 8 | 4. Retains position stability while camera moves 9 | 5. Fills the screen in a predictable way 10 | 6. Avoids floating point precision errors 11 | 12 | Setup 13 | ----- 14 | It’s super easy to get started: 15 | 16 | 1. Put the PixelArtCamera component anywhere in your scene (I recommend on your camera) 17 | 2. Connect the Camera and Canvas in the appropriate fields if they’re not automatically filled in. 18 | 3. Set the resolution on the PixelArtCamera component to your preference (and match the Pixels Per Unit to your texture imports, if you haven’t left it on the default ‘100’.) 19 | 4. Put a material using the ‘Ocias/Pixel Art Sprite’ shader on your sprites. 20 | 21 | That’s it! 22 | 23 | FAQs 24 | ---- 25 | * **Why is my font not displaying correctly?** 26 | 27 | Make sure you configure its import settings for pixel art. Set the asset's font size to the designed value, set the rendering mode to raster, and make sure the text object uses the same font size. 28 | * **Why is my world-space canvas not displaying correctly?** 29 | 30 | It may not be matching your game's pixels-per-unit settings. Set the scale of your world-space canvas to (1 / Pixels-per-unit). -------------------------------------------------------------------------------- /UnityPackageManager/Project/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /UnityPackageManager/Project/manifest.json.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d9b117a03f99c4918b523ec50d575eee 3 | timeCreated: 1507430900 4 | licenseType: Free 5 | TextScriptImporter: 6 | externalObjects: {} 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /UnityPackageManager/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | } 4 | } 5 | -------------------------------------------------------------------------------- /UnityPixelArtCamera.sublime-project: -------------------------------------------------------------------------------- 1 | { 2 | "folders": 3 | [ 4 | { 5 | "follow_symlinks": true, 6 | "path": ".", 7 | "file_include_patterns": 8 | [ 9 | "*.cs" 10 | ] 11 | } 12 | ], 13 | "solution_file": "./UnityPixelArtCamera.sln" 14 | } 15 | --------------------------------------------------------------------------------