Skip to content

Instantly share code, notes, and snippets.

@ElonGame
ElonGame / Outline.shader
Last active June 23, 2025 02:11 — forked from ScottJDaley/Outline.shader
Wide Outlines Renderer Feature for URP and ECS/DOTS/Hybrid Renderer
// Original shader by @bgolus, modified slightly by @alexanderameye for URP, modified slightly more
// by @gravitonpunch for ECS/DOTS/HybridRenderer.
// https://twitter.com/bgolus
// https://medium.com/@bgolus/the-quest-for-very-wide-outlines-ba82ed442cd9
// https://alexanderameye.github.io/
// https://twitter.com/alexanderameye/status/1332286868222775298
Shader "Hidden/Outline"
{
Properties
@ElonGame
ElonGame / app.py
Created June 5, 2025 09:15 — forked from anandadake/app.py
Convert .avi video file to .mp4 video file
"""
python -m pip install moviepy
"""
import os
from time import time
import moviepy.editor as moviepy
def convert_avi_to_mp4(avi_file_path):
# function guard
@ElonGame
ElonGame / pip.conf
Created May 15, 2025 02:43 — forked from huynle/pip.conf
pip.ini (Windows) or pip.conf (unix) for proxy
[global]
trusted-host = pypi.python.org
pypi.org
files.pythonhosted.org
proxy = http://[domain name]%5C[username]:[password]@[proxy address]:[proxy port]
@ElonGame
ElonGame / microproxy.py
Created May 15, 2025 02:40 — forked from dracos/microproxy.py
A very small python HTTP proxy
#!/usr/bin/env python
"""
Microproxy
This code is based on http://pastebin.com/mdsAjhdQ based on code based on microproxy.py written by ubershmekel in 2006.
Microproxy is a very small HTTP proxy. It relays all bytes from the client to the server at a socket send and recv level.
It looks at the Host: header to recognise where to connect to.
"""
@ElonGame
ElonGame / .block
Created May 12, 2025 08:33 — forked from mbostock/.block
Milky Way
license: gpl-3.0
redirect: https://observablehq.com/@mbostock/raster-reprojection
@ElonGame
ElonGame / ShowVertexNumber.cs
Created April 24, 2025 09:46 — forked from newpolaris/ShowVertexNumber.cs
display vertex id in unity
// Editor script that displays the number and UV coordinates of each individual vertex making up a triangle within a mesh
// To install, place in the Assets folder of a Unity project
// Open via Window > Show Vertex Info
// Author: Luke Gane
// Last updated: 2015-02-07
using UnityEditor;
using UnityEngine;
public class ShowVertexNumber : EditorWindow {
@ElonGame
ElonGame / raycastPlanetAtmosphere.glsl
Created March 17, 2025 01:43 — forked from devshgraphicsprogramming/raycastPlanetAtmosphere.glsl
Planet Atmosphere Intersection Shader Function
//!Warning does not model intersection with the Planet itself in the middle of the atmosphere
float calculateHazeFactor(in float fragDepth, in vec3 viewDir)
{
//hazeHeight and camPos are heights above sea level
bool aboveHaze = camPos>hazeHeight;
if (aboveHaze&&viewDir.y>=0.0)
return 1.0;
float planetRadius = 6357.0;
float hazeRadius = planetRadius+hazeHeight;
@ElonGame
ElonGame / UnityBuildDlcForMobileBuildTarget.cs
Created February 13, 2025 03:04 — forked from clucle/UnityBuildDlcForMobileBuildTarget.cs
Unity Build DLC for Mobile (Android, iOS, OSX)
using UnityEditor;
using UnityEngine;
using System.IO;
public class BuildAsssetBundles : MonoBehaviour {
[MenuItem ("Bundles/Build AssetBundles")]
static void BuildAllAssetBundles () {
var path = "./AssetsBundle/default";
if (!Directory.Exists(path)) {
Directory.CreateDirectory(path);
/*Texture Bombing
The basic idea behind texture bombing is to divide UV space into a regular grid of cells.
We then place an image within each cell at a random location, using a noise or pseudo-random number function.
The final result is the composite of these images over the background.
*/
color blend(
color a,
color b,
color x)
@ElonGame
ElonGame / SaveLoad_JSON.cs
Created January 5, 2025 04:52 — forked from MarcelvanDuijnDev/SaveLoad_JSON.cs
Unity Save/Load JSON files
using System.Collections.Generic;
using System.IO;
using UnityEngine;
public class SaveLoad_JSON : MonoBehaviour
{
private Json_SaveData _SaveData = new Json_SaveData();
void Start()
{