Skip to content

Instantly share code, notes, and snippets.

View geegaz's full-sized avatar
🎯
Focusing

Geegaz geegaz

🎯
Focusing
View GitHub Profile
@partybusiness
partybusiness / depth_cube.gdshader
Last active June 29, 2024 05:23
Godot Depth Cube
shader_type spatial;
render_mode unshaded, blend_mix, shadows_disabled;
uniform vec4 main_colour:source_color;
//calculates depth to the back of a cube behind each 0 to 1 UV face.bool
//If you have a cube where each face is 0 to 1 UV then it calculates the distance to each side and the back
//based on my earlier depth cube in Unity: https://gist.github.com/partybusiness/b7ec339d16d3f3b7e2b202ac4e5d8686
@TiliSleepStealer
TiliSleepStealer / DoomGlow.cs
Created June 13, 2017 21:45
Doom glow - fake volumetric light glow effect in Unity by Tili_us
// This file is in the public domain. Where
// a public domain declaration is not recognized, you are granted
// a license to freely use, modify, and redistribute this file in
// any way you choose.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Unity remake of a fake volumetric light glow effect
@jimfleming
jimfleming / UnityDiffuseLightmap.shader
Last active June 21, 2023 00:44
Example depicting applying Unity lightmapping data to a simple diffuse shader.
Shader "Diffuse Lightmap" {
Properties {
_MainTex ("Texture 1", 2D) = "white" {}
}
SubShader {
Tags { "RenderType" = "Opaque" }
Pass {