Skip to content

Instantly share code, notes, and snippets.

Kenney KenneyNL

Block or report user

Report or block KenneyNL

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View GrassGeometry.shader
Shader "Custom/Grass Geometry Shader" {
[NoScaleOffset] _MainTex("Grass A", 2D) = "white" {}
[NoScaleOffset] _GrassTwo("Grass B", 2D) = "white" {}
_Splat("Splat", 2D) = "white" {}
_Cutoff("Cutoff", Range(0,1)) = 0.25
KenneyNL / CircularMenu.cs
Last active Aug 31, 2019
Circular menu sample code for Unity
View CircularMenu.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CircularMenu : MonoBehaviour{
public float radius = 100.0f;
public float offset = 0.0f;
void Start(){
View AssetForge_billboard.shader
Shader "Unlit/Billboard"
_MainTex ("Texture", 2D) = "white" {}
Tags{ "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" "DisableBatching" = "True" }
View Billboard.shader
Shader "Custom/Billboard" {
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {}
_Color ("Tint", Color) = (1,1,1,1)
[MaterialToggle] PixelSnap ("Pixel snap", Float) = 0
View textureCombine.cs
Texture2D[] layers;
Texture2D compiledTexture = new Texture2D(layers[0].width, layers[0].height);
foreach(Texture2D layer in layers){
Color[] baseColors = compiledTexture.GetPixels();
Color[] layerColors = layer.GetPixels();
for(int p = 0; p < baseColors.Length; p++){
KenneyNL /
Created Apr 1, 2018
Flash ActionScript 3.0 apply color palette to BitmapData
var colorPalette = [0xFF5a3921, 0xFF6b8c42, 0xFF7bc67b, 0xFFffffb5];
function applyPalette(bitmap:BitmapData, palette:Array){
for(var x = 0; x < bitmap.width; x++){
for(var y = 0; y < bitmap.height; y++){
var pixel = bitmap.getPixel(x, y);
View sceneWindow.cs
using UnityEngine;
using UnityEditor;
using UnityEditor.SceneManagement;
using System.Collections.Generic;
using System.IO;
// Scene selection
View gradientShader.shader
// Shader created with Shader Forge v1.38
// Shader Forge (c) Neat Corporation / Joachim Holmer -
// Note: Manually altering this data may prevent you from opening it in Shader Forge
You can’t perform that action at this time.