Skip to content

Instantly share code, notes, and snippets.

View josephbk117's full-sized avatar

Joseph Kalathil josephbk117

View GitHub Profile
@josephbk117
josephbk117 / ExtendedSkybox.shader
Last active November 18, 2018 19:00
A unity shader code with good skybox colour and transition control ( day/night cycle)
/*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/Skybox"
{
Properties
{
_SkyColor1("Top Color Day", Color) = (0.37, 0.52, 0.73, 0)
_SkyColor2("Horizon Color Day", Color) = (0.89, 0.96, 1, 0)
@josephbk117
josephbk117 / SurfaceGenerator.cs
Last active January 29, 2024 12:41
Code for generating 2d surfaces like in Alto's Adventure
/*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*/
using UnityEngine;
public class SurfaceGenerator : MonoBehaviour
{
public bool generateContinuously = false;
public bool generateCollider = false;
@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 / JarvisMarchConvexHull.cs
Last active November 3, 2022 17:01
Jarvis march convex hull unity c# script
/*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*/
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class JarvisMarchConvexHull : MonoBehaviour
{
@josephbk117
josephbk117 / AudioVisualizer.cs
Last active November 18, 2018 18:58
Audio visualizer in unity with blend shapes
/*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*/
using UnityEngine;
[RequireComponent(typeof(SkinnedMeshRenderer))]
public class AudioVisualizer : MonoBehaviour
{
[Range(1.0f,4500.0f)]
@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
{
@josephbk117
josephbk117 / AnimatedFish.shader
Last active October 8, 2023 23:27
An animated fish shader written for use in unity
/*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/AnimatedFish"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_EffectRadius("Wave Effect Radius",Range(0.0,1.0)) = 0.5
@josephbk117
josephbk117 / WhiteNoise.shader
Last active September 18, 2022 03:37
White noise ( grain filter ) shader in unity
Shader "BitShiftProductions/Noises"
{
Properties
{
_MainTex("Texture", 2D)="white"
_NoiseScale("Noise Scale",Float) = 5.0
_Strength("Noise Strength",Float) = 1.0
}
SubShader
{
@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 / VoronoiNoise.shader
Last active May 18, 2024 22:21
Voronoi shader in unity
/*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 "BitShiftProductions/VoronoiMagic2"
{
Properties
{
}