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 "Custom/UIBlur" | |
{ | |
Properties | |
{ | |
[Toggle(IS_BLUR_ALPHA_MASKED)] _IsAlphaMasked("Image Alpha Masks Blur", Float) = 1 | |
[Toggle(IS_SPRITE_VISIBLE)] _IsSpriteVisible("Show Image", Float) = 1 | |
// Internally enforced by MAX_RADIUS | |
_Radius("Blur Radius", Range(0, 64)) = 1 |
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 LayerMask layerMask = 1 << 0; // default layer (0) | |
public LayerMask layerMask2 = ~0; // everything | |
public LayerMask layerMask2b = -1; // everything | |
public LayerMask layerMask3 = default;// nothing | |
public LayerMask layerMask4 = 0;// nothing | |
public LayerMask layerMask4b; // nothing | |
public LayerMask layerMask5 = 1 << 5;// layer 5 (UI) | |
public LayerMask layerMask6 = 1 << 2 | 1 << 5;// Ignore Raycast (Layer 2) AND UI (Layer 5) | |
public LayerMask layerMask7 = ~(1 << 4 | 1 << 5); // all except layer 4 and 5 | |
public LayerMask layerMask8 = ~(1 << 4); // all except layer 4 |
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
// Source: http://forum.unity3d.com/threads/webgl-transparent-background.284699/#post-1880667 | |
// Clears the WebGL context alpha so you can have a transparent Unity canvas above DOM content | |
// Add this .jslib to your project et voila! | |
var LibraryGLClear = { | |
glClear: function(mask) | |
{ | |
if (mask == 0x00004000) | |
{ | |
var v = GLctx.getParameter(GLctx.COLOR_WRITEMASK); | |
if (!v[0] && !v[1] && !v[2] && v[3]) |