Skip to content

Instantly share code, notes, and snippets.

💻
Game developer & graphics programmer

Tahar Meijs tntmeijs

💻
Game developer & graphics programmer
Block or report user

Report or block tntmeijs

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
@tntmeijs
tntmeijs / editorscreenshot.cs
Created Feb 13, 2018
An Unity editor extension which enables you to take screenshots of the scene view window.
View editorscreenshot.cs
using System.IO;
using UnityEditor;
using UnityEngine;
/*
* This creative work (which includes code) is under exclusive copyright by default.
* Unless specified otherwise by Tahar Meijs, nobody else may use, copy, distribute,
* or modify this work without being at risk of take-downs, shake-downs, or litigation.
*
* Testing code does not mean you will are allowed to keep on using this codebase for
@tntmeijs
tntmeijs / layer2d.cs
Created Feb 13, 2018
A simple tool for the Unity2D editor which allows you to hide sorting layers.
View layer2d.cs
using UnityEditor;
using UnityEngine;
/*
* This creative work (which includes code) is under exclusive copyright by default.
* Unless specified otherwise by Tahar Meijs, nobody else may use, copy, distribute,
* or modify this work without being at risk of take-downs, shake-downs, or litigation.
*
* Testing code does not mean you will are allowed to keep on using this codebase for
* your own personal / commercial gain. However, it is always encouraged to use this
@tntmeijs
tntmeijs / unitythreedimensionalperlinnoise.cs
Last active Feb 11, 2018
A 3D implementation using the 2D Perlin noise function of Unity3D.
View unitythreedimensionalperlinnoise.cs
public static float Noise3D(float x, float y, float z, float frequency, float amplitude, float persistence, int octave, int seed)
{
float noise = 0.0f;
for (int i = 0; i < octave; ++i)
{
// Get all permutations of noise for each individual axis
float noiseXY = Mathf.PerlinNoise(x * frequency + seed, y * frequency + seed) * amplitude;
float noiseXZ = Mathf.PerlinNoise(x * frequency + seed, z * frequency + seed) * amplitude;
float noiseYZ = Mathf.PerlinNoise(y * frequency + seed, z * frequency + seed) * amplitude;
You can’t perform that action at this time.