Skip to content

Instantly share code, notes, and snippets.

View josephbk117's full-sized avatar

Joseph Kalathil josephbk117

View GitHub Profile
@josephbk117
josephbk117 / PixelateImageEffect.cs
Last active April 16, 2023 18:00
Pixelate 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*/
using UnityEngine;
[ExecuteInEditMode, RequireComponent(typeof(Camera))]
public class PixelateImageEffect : MonoBehaviour
{
public Material material;
@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 / 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 / ReflectionProbeAccess.shader
Created November 18, 2018 18:51
Reflection Probe In Custom 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 "BitshiftProgrammer/ReflectionProbeAccess"
{
Properties
{
_Roughness("Roughness", Range(0.0, 10.0)) = 0.0
}
@josephbk117
josephbk117 / SurfaceFortnite
Last active March 8, 2021 11:44
A Unity shader for Fortnite Construction Procedural Animation
/*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/SurfaceFortnite" // Goto www.bitshiftprogrammer.com for more
{
Properties
{
_Color ("Color", Color) = (1,1,1,1)
[HideInInspector]_MainTex("Main texture", 2D) = "white"{}
@josephbk117
josephbk117 / ReplacementShaderTest.cs
Created December 22, 2018 10:53
Replacement Shaders & Shader Keywords
using UnityEngine;
public class ReplacementShaderTest : MonoBehaviour
{
public Shader replaceShader;
private string[] KeyWords = new string[] { "UV_VIS", "LOCAL_POS_VIS", "WORLD_POS_VIS", "DEPTH_VIS", "LOCAL_NORMAL_VIS", "WORLD_NORMAL_VIS" };
private void Update()
{
if (Input.GetKeyDown(KeyCode.A))
GetComponent<Camera>().SetReplacementShader(replaceShader, ""); // All objects will have shader applied on it
@josephbk117
josephbk117 / FirstPass.shader
Created December 7, 2018 16:24
Unity built in Terrain Diffuse Shader
// Unity built-in shader source. Copyright (c) 2016 Unity Technologies. MIT license (see license.txt)
Shader "Nature/Terrain/Diffuse" {
Properties {
[HideInInspector] _Control ("Control (RGBA)", 2D) = "red" {}
[HideInInspector] _Splat3 ("Layer 3 (A)", 2D) = "white" {}
[HideInInspector] _Splat2 ("Layer 2 (B)", 2D) = "white" {}
[HideInInspector] _Splat1 ("Layer 1 (G)", 2D) = "white" {}
[HideInInspector] _Splat0 ("Layer 0 (R)", 2D) = "white" {}
[HideInInspector] _Normal3 ("Normal 3 (A)", 2D) = "bump" {}
@josephbk117
josephbk117 / FastUIJigle.shader
Last active June 29, 2019 03:37
Fast UI Jiggle shader 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 this stuff is not my responsibility*/
Shader "BitshiftProductions/Fast-UI-Jiggle"
{
Properties
{
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {}
_Color("Tint", Color) = (1,1,1,1)
@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 / 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)]