Skip to content

Instantly share code, notes, and snippets.

@JibbSmart
JibbSmart / JoyShockLibrary Sample
Last active October 10, 2023 01:24
Quick ImGui application I made to figure out all the quality of life stuff folks might want for JoyShockLibrary 3.0
// Looks like this: https://x.com/JibbSmart/status/1642565648403550208?s=20
// Settings
int _gyroSpace = 2;
float _sensitivity = 1.f;
float _tightening = 2.f;
int _focusedDevice = 0;
bool _gyroActive = false;
int _defaultCalibrationMode = 1;
@JibbSmart
JibbSmart / GradProgress.shader
Created May 29, 2020 02:38
Inspired by Ben Golus' examples of different ways to draw a circular progress bar, this is conceptually similar to the "Arc Tangent" approach without any trig -- about twice as fast for the same look.
Shader "Unity/GradProgress" {
Properties{
_Frac("Progress Bar Value", Range(0,1)) = 1.0
[NoScaleOffset] _AlphaTex("Alpha", 2D) = "White" {}
_FillColor("Fill Color", Color) = (1,1,1,1)
_BackColor("Back Color", Color) = (0,0,0,1)
[Toggle(NO_ANTI_ALIASING)] _NoAntiAliasing("Disable Anti-Aliasing", Float) = 0.0
}
SubShader{