This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| // DERIVED FROM https://stewmcc.com/post/check-for-android-tv-in-unity/ | |
| public class Platform_AndroidTV : MonoBehaviour { | |
| #if UNITY_ANDROID | |
| sbyte isAndroidTV = -1; // -1 == not checked yet; 0 == false; 1 == true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1) Generate a private key and certificate signing request: | |
| openssl genrsa -out ios_distribution.key 2048 | |
| openssl req -new -key ios_distribution.key -out ios_distribution.csr -subj '/emailAddress=me@example.com, CN=Example, C=US' | |
| 2) Upload CSR to apple at: https://developer.apple.com/account/ios/certificate/create | |
| - choose Production -> App Store and Ad Hoc | |
| 3) Download the resulting ios_distribution.cer, and convert it to .pem format: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //============================================================================================================================== | |
| // An optimized AMD FSR's EASU implementation for Mobiles | |
| // Based on https://github.com/GPUOpen-Effects/FidelityFX-FSR/blob/master/ffx-fsr/ffx_fsr1.h | |
| // Details can be found: https://atyuwen.github.io/posts/optimizing-fsr/ | |
| // Distributed under the MIT License. Copyright (c) 2021 atyuwen. | |
| // -- FsrEasuSampleH should be implemented by calling shader, like following: | |
| // AH3 FsrEasuSampleH(AF2 p) { return MyTex.SampleLevel(LinearSampler, p, 0).xyz; } | |
| //============================================================================================================================== | |
| void FsrEasuL( | |
| out AH3 pix, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System.Reflection; | |
| using UnityEditor.ShaderGraph; | |
| using UnityEngine; | |
| [Title("Custom", "Image", "Sobel Edge Detection")] | |
| public class SobelNode : CodeFunctionNode | |
| { | |
| public SobelNode() | |
| { | |
| name = "Sobel Edge Detection"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| /* | |
| Vector Range Attribute by Just a Pixel (Danny Goodayle @DGoodayle) - http://www.justapixel.co.uk | |
| Copyright (c) 2015 | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEngine.UI; | |
| /* | |
| Radial Layout Group by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk | |
| Copyright (c) 2015 | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Shader "Caustics" | |
| { | |
| Properties | |
| { | |
| [Header(Caustics)] | |
| _CausticsTexture("Texture", 2D) = "white" {} | |
| _CausticsStrength("Strength", float) = 0 | |
| _CausticsSplit("RGB Split", float) = 0 | |
| [Header(Movement)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Lookup Tables for Transvoxel's Modified Marching Cubes | |
| // | |
| // Unlike the original paper (Marching Cubes: A High Resolution 3D Surface Construction Algorithm), these tables guarantee | |
| // a closed mesh "whose connected components are continuous and free of holes." | |
| // | |
| // Rotations are prioritised over inversions so that 3 of the 6 cases containing ambiguous faces are never added. 3 extra | |
| // cases are added as a post-process, overriding inverses through custom-build rotations to eliminate the rest. | |
| // | |
| // Uses the exact same co-ordinate system as https://gist.github.com/dwilliamson/c041e3454a713e58baf6e4f8e5fffecd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /*Please do support www.bitshiftprogrammer.com by joining the facebook page : fb.com/BitshiftProgrammer | |
| Legal Stuff: | |
| This code is free to use no restrictions but attribution would be appreciated. | |
| Any damage caused either partly or completly due to usage this stuff is not my responsibility*/ | |
| Shader "BitshiftProgrammer/ReflectionProbeAccess" | |
| { | |
| Properties | |
| { | |
| _Roughness("Roughness", Range(0.0, 10.0)) = 0.0 | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public static class FileComparer | |
| { | |
| public static bool CompareEquals(string filePath1, string filePath2, int bufferSize = 65536) | |
| { | |
| if (filePath1 == filePath2) return true; | |
| var buffer1 = ArrayPool<byte>.Shared.Rent(bufferSize); | |
| var buffer2 = ArrayPool<byte>.Shared.Rent(bufferSize); | |
| try | |
| { |