Skip to content

Instantly share code, notes, and snippets.

Avatar

Kronnect kronnect

View GitHub Profile
@kronnect
kronnect / ScreenMask.shader
Created Sep 23, 2019
Screen Mask for Highlight Plus
View ScreenMask.shader
Shader "HighlightPlus/ScreenMask"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "RenderType"="Opaque" }
Stencil {
View Grayscale.shader
Shader "Hidden/Custom/Grayscale"
{
HLSLINCLUDE
#include "Packages/com.unity.postprocessing/PostProcessing/Shaders/StdLib.hlsl"
TEXTURE2D_SAMPLER2D(_MainTex, sampler_MainTex);
float _Blend;
@kronnect
kronnect / gist:b533e6b4f44f965331de
Last active Aug 29, 2015
Workaround for getting the local currency symbol in Mono 2.x
View gist:b533e6b4f44f965331de
/// <summary>
/// Gets the local currency symbol based on system language. Due to a bug in Mono 2.x, string.Format("c") will not recognize regional currency info and defaults to EN-US ($).
/// Contact: ramiro@crossingfrontiers.net
/// </summary>
/// <seealso href="http://www.xe.com/symbols.php"/>
/// <permission href="https://creativecommons.org/licenses/by/2.0/" />
/// <returns>The local currency symbol.</returns>
public static string GetLocalCurrencySymbol() {
Hashtable symbols = new Hashtable();