Skip to content

Instantly share code, notes, and snippets.

Shader "Pristine Grid"
{
Properties
{
[KeywordEnum(MeshUV, WorldX, WorldY, WorldZ)] _UVMode ("UV Mode", Float) = 2.0
_GridScale ("Grid Scale", Float) = 1.0
_LineWidthX ("Line Width X", Range(0,1.0)) = 0.01
_LineWidthY ("Line Width Y", Range(0,1.0)) = 0.01
Shader "Hidden/JumpFloodOutline"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader
{
Tags { "PreviewType" = "Plane" }
Cull Off ZWrite Off ZTest Always
@kosua20
kosua20 / gist:0c506b81b3812ac900048059d2383126
Created March 18, 2017 18:35
NVIDIA FXAA 3.11 by TIMOTHY LOTTES
/*============================================================================
NVIDIA FXAA 3.11 by TIMOTHY LOTTES
------------------------------------------------------------------------------
COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED.
------------------------------------------------------------------------------
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
@dominicthomas
dominicthomas / Android Display Content Height
Created January 4, 2014 16:41
Get screen height excluding the action bar and notification bar.
public int getDisplayContentHeight() {
final WindowManager windowManager = getWindowManager();
final Point size = new Point();
int screenHeight = 0, actionBarHeight = 0;
if (getActionBar() != null) {
actionBarHeight = getActionBar().getHeight();
}
int contentTop = ((ViewGroup) findViewById(android.R.id.content)).getTop();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
windowManager.getDefaultDisplay().getSize(size);