Skip to content

Instantly share code, notes, and snippets.

View josephbk117's full-sized avatar

Joseph Kalathil josephbk117

View GitHub Profile
@josephbk117
josephbk117 / Liquid.shader
Last active March 22, 2024 07:20
Unity liquid shader
/*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 this stuff is not my responsibility*/
Shader "BitshiftProgrammer/Liquid"
{
Properties
{
_Colour ("Colour", Color) = (1,1,1,1)
_FillAmount ("Fill Amount", Range(-10,10)) = 0.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 / Billboard.shader
Last active November 12, 2023 18:13
Advanced Billboard Shader For Unity [ Both Quads & UI ]
/*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 this stuff is not my responsibility*/
Shader "BitshiftProgrammer/Billboard"
{
Properties
{
_MainTex ("Texture Image", 2D) = "white" {}
_Scaling("Scaling", Float) = 1.0
@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 / OptimizedUI.shader
Last active September 11, 2023 14:18
Better UI shaderfor Unity UI
/*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 this stuff is not my responsibility*/
Shader "BitshiftProductions/OptimizedUI"
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Color("Tint", Color) = (1,1,1,1)
@josephbk117
josephbk117 / ColouredFog.shader
Last active September 11, 2023 14:18
Screen Space Multi-Coloured Fog - Unity Shader
/*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 this stuff is not my responsibility*/
Shader "BitshiftProductions/ColouredFog"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_ColorLookUp("Fog Colour Look Up", 2D) = "white"{}
@josephbk117
josephbk117 / VoronoiNoise.shader
Last active September 11, 2023 14:17
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
{
}
@josephbk117
josephbk117 / MotionLogic.cs
Last active September 11, 2023 14:17
Various motion exmaples with sin & cos
/*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*/
#define _Example4
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
@josephbk117
josephbk117 / Dither.shader
Last active September 11, 2023 14:17
Dithering Image Effect For 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 "Hidden/Dither"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
@josephbk117
josephbk117 / TriPlanarTerrain.shader
Last active July 12, 2023 06:27
Tri-Planar Unity Terrain Shader
/*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 this stuff is not my responsibility*/
Shader "BitshiftProgrammer/TriPlanarTerrain"
{
Properties {
_TransitionFalloff ("Transition Falloff", Range(0.01, 10.0)) = 4.0
[HideInInspector] _Control ("Control (RGBA)", 2D) = "red" {}
[HideInInspector] _Splat3 ("Layer 3 (A)", 2D) = "white" {}