Skip to content

Instantly share code, notes, and snippets.

View mrbbbaixue's full-sized avatar
:electron:
ヾ(^▽^*)))

MrBBBaiXue mrbbbaixue

:electron:
ヾ(^▽^*)))
View GitHub Profile
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@ameerkat
ameerkat / MD5.cs
Created October 29, 2016 08:35
MD5 Implementation in C# based on Wikipedia psuedocode
using System;
using System.Linq;
namespace MD5
{
/// <summary>
/// RFC for MD5 https://tools.ietf.org/html/rfc1321
/// Based on the pseudo code from Wikipedia: https://en.wikipedia.org/wiki/MD5
/// </summary>
public class MD5
@HungryProton
HungryProton / shader_cache.gd
Last active July 15, 2024 05:25
Godot shader cache hack
extends Spatial
var _materials := []
var _process_materials := []
var _count := 0
func _ready() -> void:
_find_all_materials("res://")
print(_process_materials)
# MIT LICENSE
# Authored by iFire#6518 and alexfreyre#1663
# This code ONLY apply to a mesh and simulations with ONLY the same vertex number
import bpy
#Converts a MeshCache or Cloth modifiers to ShapeKeys
frame = bpy.context.scene.frame_start
for frame in range(bpy.context.scene.frame_end + 1):
bpy.context.scene.frame_current = frame
@wojtekpil
wojtekpil / hterrain_detail_enhanced.shader
Last active October 11, 2023 19:14
Hterrain enhanced shader for detail layers
shader_type spatial;
render_mode cull_disabled, blend_mix,diffuse_burley, specular_schlick_ggx;
uniform sampler2D u_terrain_heightmap;
uniform sampler2D u_terrain_detailmap;
uniform sampler2D u_terrain_normalmap;
uniform sampler2D u_terrain_globalmap : hint_albedo;
uniform mat4 u_terrain_inverse_transform;
uniform mat3 u_terrain_normal_basis;
@wojtekpil
wojtekpil / hterrain_enhanced.shader
Created July 28, 2021 12:59
Hterrain enhanced shader for terrain (Classic4)
shader_type spatial;
render_mode cull_back,blend_mix, diffuse_burley, specular_schlick_ggx;
// This is the reference shader of the plugin, and has the most features.
// it should be preferred for high-end graphics cards.
// For less features but lower-end targets, see the lite version.
uniform sampler2D u_terrain_heightmap;
uniform sampler2D u_terrain_normalmap;
// I had to remove `hint_albedo` from colormap because it makes sRGB conversion kick in,
@inc0der
inc0der / basic_fps_controller.gd
Last active October 12, 2022 05:34
Basic FPS Controller for Godot 4
# For Godot 4 Alpha 2
# The head node should contain the camera, flashlight and other things that require a pivot/rotation
class_name BasicFpsController
extends CharacterBody3D
@export var MOVE_SPEED := 4.0
@export var JUMP_FORCE := 4.5
@export var SPRINT_SPEED := 6.0
@fire
fire / gltf_merge_anim.py
Created March 3, 2022 07:07 — forked from scurest/gltf_merge_anim.py
Quick code to convert a glTF with multiple non-overlapping animations to one with a single animation.
#!/bin/env python
"""Merge mutiple glTF 2.0 animations into one."""
import json
import sys
def merge(gltf):
# Maps (node, path) to (input, output, interpolation)
target_to_sampler = {}
for animation in gltf.get('animations', []):
for channel in animation['channels']:

Godot dotnet6 branch notes

Update 22/04/22

I've managed to get Windows MSVC editor builds working about as well as Linux builds on my fork: https://github.com/lewiji/godot/tree/dotnet6

This fork includes patches mentioned in the details below for libicu compatibility, as well as specific fixes for MSVC compatibility.

I've also set up Github CI builds there which should be working for both Linux and Windows editors (unsure about export templates though at least the Linux ones are building currently).

@Arnklit
Arnklit / generate_plane.gd
Created March 16, 2022 06:56
Subdivided Plane Set as Lod Levels in Godot 4.0
@tool
extends MeshInstance3D
@export var generate := false:
set(v):
gen_mesh()
@export_range(0, 10) var subdivisions := 5
@export var size := 8.0