Skip to content

Instantly share code, notes, and snippets.

View tejaswingm's full-sized avatar

Tej Macharla tejaswingm

View GitHub Profile
@tejaswingm
tejaswingm / XRPluginManagementSettings.cs
Created March 24, 2023 00:47 — forked from korinVR/XRPluginManagementSettings.cs
Enable and disable XR Plug-in Management plugins
using System;
using UnityEditor;
using UnityEditor.XR.Management;
using UnityEditor.XR.Management.Metadata;
using UnityEngine;
namespace FrameSynthesis.XR
{
// ref. https://docs.unity3d.com/Packages/com.unity.xr.management@4.1/manual/EndUser.html
public static class XRPluginManagementSettings

About

Interpolating between things using lerp.

function lerp (start, end, t) {
  return start * (1 - t) + end * t;
}
@tejaswingm
tejaswingm / isWrit
Created March 24, 2023 00:44 — forked from ssshake/isWrit
Photon PUN Cheat Sheet
## Photon Methods
**public class Blank : Photon.PunBehaviour**
instead of mono behavior, use this to receive photon callbacks in your script.
**public override void OnLeftRoom()**
An example of overriding a punbehavior callback
@tejaswingm
tejaswingm / UnityShaderCheatSheet.md
Created March 24, 2023 00:44 — forked from smkplus/UnityShaderCheatSheet.md
Controlling fixed function states from materials/scripts in Unity

16999105_467532653370479_4085466863356780898_n

Shader "MaterialPropertyDrawer"
{
Properties
{
_MainTex("Texture", 2D) = "white" {}
 
[HideInInspector] _MainTex2("Hide Texture", 2D) = "white" {}
@tejaswingm
tejaswingm / FlippingNormals.shader
Created March 24, 2023 00:44 — forked from AdrianaVecc/FlippingNormals.shader
A shader to invert a sphere's normals in Unity in order to see it from inside out. Useful to create a 360 video player
Shader "Flipping Normals" {
Properties {
_MainTex ("Base (RGB)", 2D) = "white" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
Cull Off
@tejaswingm
tejaswingm / ffmpeg-cheatsheet.md
Created March 24, 2023 00:44 — forked from nickkraakman/ffmpeg-cheatsheet.md
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@tejaswingm
tejaswingm / AwesomeStruct.cpp
Created March 24, 2023 00:43 — forked from hanzochang/AwesomeStruct.cpp
[UE4(Unreal Engine 4)] Example for parsing json and creating struct instance from parsed json.
#include "ProcedualSpline.h"
#include "AwesomeStruct.h"
FAwesomeStruct FAwesomeStruct::BuildAwesomeStruct(
FVector AwesomeVector,
bool AwesomeBoolean,
float AwesomeFloat,
int32 AwesomeInteger,
FRotator AwesomeRotator
)
@tejaswingm
tejaswingm / ToggleTest.shader
Created March 24, 2023 00:43 — forked from keijiro/ToggleTest.shader
Shows how to use the Toggle material property drawer in a shader. See the reference manual for further details: http://docs.unity3d.com/ScriptReference/MaterialPropertyDrawer.html
Shader "ToggleTest"
{
Properties
{
[Toggle(FILL_WITH_RED)]
_FillWithRed ("Fill With Red", Float) = 0
}
SubShader
{
Pass
@tejaswingm
tejaswingm / introrx.md
Created March 24, 2023 00:42 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@tejaswingm
tejaswingm / gist:03500a8f9e9c9b82f474a14b64ebb28f
Created March 24, 2023 00:42 — forked from cdown/gist:1163649
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
old_lc_collate=$LC_COLLATE
LC_COLLATE=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:$i:1}"
case $c in