Skip to content

Instantly share code, notes, and snippets.

View Demkeys's full-sized avatar
💭
Always learning and sharing knowledge

Abhinav a.k.a Demkeys Demkeys

💭
Always learning and sharing knowledge
View GitHub Profile
@Demkeys
Demkeys / MuteTimelineTracksScript.cs
Created June 29, 2018 13:59
Example code showing how to mute Tracks in a Timeline asset.
/// <summary>
/// Instructions
/// - Create a Timeline asset. Add 3 tracks to it.
/// - Create empty GameObject in scene. Attach this script to the GameObject. Then attach a PlayableDirector component to it.
/// Drag and drop the Timeline asset you created into the Playable field of the PlayableDirector.
/// - Hit Play. The 1, 2 and 3 keys on your keyboard mute the first, second and third tracks respectively.
/// </summary>
using System.Collections;
using System.Collections.Generic;
This is a test gist to test out the VRCStringLoader. This is an update.
@Demkeys
Demkeys / 84-Shader__URP Unlit Shader-NewURPUnlitShader.shader.txt
Created July 19, 2022 12:23
Shader template for creating Unlit shader in Unity's URP.
Shader "Unlit/#NAME#"
{
Properties
{ }
SubShader
{
Tags { "RenderType" = "Opaque" "RenderPipeline" = "UniversalPipeline" }
Pass
@Demkeys
Demkeys / GUIStylesExample.cs
Created December 4, 2018 16:31
Example code showing how to use the GUIStyles provided in UnityEditor.EditorStyles class.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
public class GUIStylesExample : EditorWindow {
string textFieldString = "This is a textbox that looks like a bold Label.";
[MenuItem("My Tools/GUI Styles Example")]
@Demkeys
Demkeys / TextureBlendShader.shader
Created September 3, 2019 06:12
Simple texture blending shader that blends 3 textures of varying tiling and offsets.
Shader "Custom/TextureBlendShader"
{
Properties
{
_MainTex01 ("Texture01", 2D) = "white" {}
_MainTex02 ("Texture02", 2D) = "white" {}
_MainTex03 ("Texture03", 2D) = "white" {}
[Header(Fragment RGBA Multipliers)]
_FragR ("FragR", Range(0,5)) = 1
_FragG ("FragG", Range(0,5)) = 1
@Demkeys
Demkeys / DissolveNoClip.shader
Last active September 15, 2020 06:41
Unlit Dissolve effect implemented with using clip(). Useful for platforms where clip() causes bad performance.
Shader "Unlit/DissolveNoClip"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_MainTexCol ("Texture Color", Color) = (1,1,1,1)
_NoiseTex ("Noise Texture", 2D) = "white" {}
_AlphaCutOff ("Alpha Cut Off", Range(0,1)) = 1
_EdgeSize ("Edge Size", Range(0,0.5)) = 0.5
_EdgeColor ("Edge Color", Color) = (1,1,1,1)
@Demkeys
Demkeys / SimpleUdonAudVis.cs
Created May 23, 2020 06:10
Simple audio visualizer script to be used with VRChat Udon and UdonSharp.
// Audio Visualize script:
// -Assign a prefab asset to the prefab01 field in the Inspector.
// -Set YScale value in Inspector.
// -Assign a audio source to the audSource field in the Inspector.
using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;
@Demkeys
Demkeys / PerlinNoisePositionUdonGraph.txt
Last active April 1, 2020 08:28
VRChat Udon graph to set the positions of an array of transforms using Perline Noise
VRChat Udon graph to set the positions of an array of transforms using Perline Noise.
Refer to this tweet for more info: https://twitter.com/abhinav_Demkeys/status/1245266602381238272
--------------------------------------------------------------------------------------------
AO1b227bSBL9FYHPaqPvFwN5mM1cEOxmNoATv2wCo68Jd2UyK1HZcRx/2TzsJ+0vbFGyZNnsaDqyFciZIEYg0VSreU7VqVNF+n+///ey+mAn81gd/+OySvPJ5Fd7Dm+qk4tZF89P6ubtJB6dnbXvz57PJ139flJ729Vtc3a2ecbtN7feVeNqXgdYkWoprWAMMRsM4pxJ5LAMSJOEDQ7eRoPh5PftrO6/oDq+rH6rjhGh+AiPq4vqWCt5hK/GVdOG+OrZjzPYcuW9sMxYhRgLFnEdPdLKCcSoxp55kajHn/plqzfjKk3a/1x/8M1ymdP+0meLa583dXfxd/fP6LvTJSCXVd3MOtv4+OzH6rj/5lk3hWu6/nVVXY13+dgSnKMlOuPR+cy300ntxqPTOJ3BhT/hR7j/Nx49BcTn0/ikifNuaifj0Yu5A/z/Gi9etv+KzROnlBVeSGIYj1ibT/iIVldv+m0NmHzaNh/itAMqX7a3aVpu/jOkleC7lTSl8YA04lm0QSVY1BLEozDIYq6Q1sETK70lQQNp+2AsD85mmP8QQr1bgDPHg+SBIuu8B6wkBHh0DtFIomTMSeV9DitGr7GScoiVkthY4QJihkXEsYVFPbMoWUep9Cb4xBcBziPHkpuABIcc444wZCIlQJfEjHNDjRd7AnWnNCjh4r6SUwLeVkaEoANGMBZMSWOQ0goWDY4hpxxFIgpFhIeXxH6XnN0lpwTfraRxMawTEP8yCk
@Demkeys
Demkeys / UdonMoveCubeExample.txt
Last active March 30, 2020 12:56
VRChat Udon graph to move object up and down using Mathf.Sin and Time.time
// Below is the text version of an Udon graph that moves a gameobject up and down using
// Mathf.Sin and Time.time. Copy the below text and paste it directly in the Udon graph
// window to get the entire graph.
// NOTE: Variable references get messed up when copying nodes, so refer to this tweet
// to correct the variable references in your node graph.
// https://twitter.com/abhinav_Demkeys/status/1244576591616802816
-------------------------------------------------------------------------------------------------
AO1Y21LbVhT9FUbP2sy5X5jhoQ1pJ9OmzZTAS2E85ybXrZEYW07jAl/Wh35Sf6HbF4GDBCgJTmjawQ9Hwpb2Za21L3//+ddF9saNZynb+/kiK2bj8Q/uDC+yw/m0TmeHo3I4TruDQXU+eDkb16Pz8Si4elSVg8HmN969eOcqy7PZKOITZWDCSUVABBNApEKAZaqAaJXyRBRWWopfPq+mo8ULsr2L7G22B5arXZJn82yPKrNLrvKsrGI6enEwRZMzkhRhRhlwJBQgbIpgdGIQnIuea8e5D5cEH5ud5lkxrn5f//B09ZjjhevTpe+zclTPf/S/plAfrwJykY3Kae3KkF4cZHuLN0/rCfq0/vc6RLsrN/Ods2moJuORz3eO02SKHuyLXbL4y3eeYehmk7Rfplk9ceN859XMYyC/S/PX1W+p3PdaOxmkopaLRIy9FDK7yp+YTYyQ7Op0YdYGTI4WFj4vh6MyHSQ/GyJUvq+GDQJWpjdXxxXioEG
@Demkeys
Demkeys / 84-Shader__Geometry Shader-NewGeomShader.shader.txt
Last active March 13, 2020 08:17
Geometry shader template for Unity. Creates boilerplate code for a simple geometry shader.
// This is a script template to create a simple geometry shader in Unity.
// Place this file at the following location: [Unity Editor Path]\Editor\Data\Resources\ScriptTemplates
Shader "Custom/#NAME#"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
}
SubShader