Skip to content

Instantly share code, notes, and snippets.

View josephbk117's full-sized avatar

Joseph Kalathil josephbk117

View GitHub Profile
@josephbk117
josephbk117 / DirectionalColour.shader
Last active November 18, 2018 18:57
unity shader that shows texture based on the object's normal
/*Please do support www.bitshiftprogrammer.com by joining the facebook page : fb.com/BitshiftProgrammer
Legal Stuff:
This code is free to use no restrictions but attribution would be appreciated.
Any damage caused either partly or completly due to usage of this stuff is not my responsibility*/
Shader "BitShiftProgrammer/DirectionalColour"
{
Properties
{
_Tex1 ("Texture 1", 2D) = "white" {}
_Tex2("Texture 2", 2D) = "white"{}
@josephbk117
josephbk117 / SurfaceImitator.cs
Created January 8, 2018 12:25
depth surface generated with the help of surface generator script
using UnityEngine;
public class SurfaceImitator : MonoBehaviour
{
public SurfaceGenerator reference;
public bool generateCollider = true;
private Mesh mesh;
private Vector3[] vertices;
@josephbk117
josephbk117 / GenericsExample.cs
Created January 11, 2018 07:21
An exmple of generics in c#
using System;
using System.Collections;
using System.Collections.Generic;
public interface IUseMagic
{
void UseMagic();
}
public class MagicUser : IUseMagic
{