Skip to content

Instantly share code, notes, and snippets.

@dnnkeeper
dnnkeeper / FullscreenGameWindow.cs
Created September 30, 2021 12:35
Unity Fullscreen Game Window F11
using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
using UnityEngine.InputSystem;
[InitializeOnLoad]
public class FullscreenGameWindow {
#if UNITY_EDITOR
@dnnkeeper
dnnkeeper / LinkSimilarMeshes.py
Last active June 24, 2026 16:45
Blender plugin for finding similar meshes and linking their data. Select->Similar Objects. N->Tools
import bpy
from concurrent.futures import ThreadPoolExecutor
bl_info = {
"name": "Link Similar Meshes",
"blender": (2, 80, 0),
"category": "Object",
"version": (1, 0, 1),
"author": "dnnkeeper",
"description": "Finds similar meshes in a scene and links their data",
@dnnkeeper
dnnkeeper / gist:acd8afa5a404808c913748312c997a0d
Created September 15, 2025 16:09
GetReflectionProbe.hlsl
#define UNITY_SAMPLE_TEXCUBE(tex,coord) tex.Sample (sampler##tex,coord)
#define UNITY_SAMPLE_TEXCUBE_LOD(tex,coord,lod) tex.SampleLevel (sampler##tex,coord, lod)
inline half3 DecodeHDR(half4 data, half4 decodeInstructions, int colorspaceIsGamma)
{
// Take into account texture alpha if decodeInstructions.w is true(the alpha value affects the RGB channels)
half alpha = decodeInstructions.w * (data.a - 1.0) + 1.0;
// If Linear mode is not supported we can skip exponent part
if(colorspaceIsGamma)