Skip to content

Instantly share code, notes, and snippets.

View hiulit's full-sized avatar
💻
Working

hiulit

💻
Working
View GitHub Profile
@Sephirothphoenix
Sephirothphoenix / Crystal.shader
Created February 25, 2021 05:58
Robe Shaders (Golden Scythe, Godot)
shader_type canvas_item;
void fragment() {
// Color of the current pixel
vec4 oC = texture(TEXTURE, UV);
// Get the difference between the current pixel color and the color to replace, and replace the color
// Exterior Main
if (max(max(max(abs(oC.r - 0.408), abs(oC.g - 0.282)), abs(oC.b - 0.471)), abs(oC.a - 1.0)) <= 0.01){oC = vec4(
@jordanlis
jordanlis / godot_2d_wind_shader.txt
Last active January 21, 2021 01:52
godot 2D wind shader
// original wind shader from https://github.com/Maujoe/godot-simple-wind-shader-2d/tree/master/assets/maujoe.simple_wind_shader_2d
// original script modified by HungryProton so that the assets are moving differently : https://pastebin.com/VL3AfV8D
//
// speed - The speed of the wind movement.
// minStrength - The minimal strength of the wind movement.
// maxStrength - The maximal strength of the wind movement.
// strengthScale - Scalefactor for the wind strength.
// interval - The time between minimal and maximal strength changes.
// detail - The detail (number of waves) of the wind movement.
// distortion - The strength of geometry distortion.
shader_type canvas_item;
render_mode blend_mix;
uniform float noiseSize : hint_range(0, 50) = 15.0;
uniform float speed : hint_range(-10.0, 10.0);
uniform float albedo : hint_range(0.0, 1.0) = 0.7;
float rand(vec2 coord) {
return fract(sin(dot(coord, vec2(35, 62)) * 1000.0) * 1000.0);
}
@cenullum
cenullum / circle.shader
Created October 18, 2020 16:30
Godot Engine Circle with Outline Color Shader
shader_type canvas_item;
uniform vec4 outline_color:hint_color = vec4(1.0,1.0,0.0,1.0);
uniform float inner_circle=0.45;
uniform float outer_circle=0.5;
const vec4 alpha_color= vec4(0,0,0,0);
uniform float smoothness=0.01;
@securas
securas / block_tileset.gd
Created August 6, 2020 15:02
A custom godot autotiler for blocks
tool
extends TileSet
const EMPTY_AUTOTILE = Vector2( 4, 0 )
var block_tiles = [ "blocks" ]
func _forward_subtile_selection(autotile_id : int, _bitmask : int, tilemap : Object, tile_location : Vector2 ):
if block_tiles.find( tile_get_name( autotile_id ) ) < 0:
@sonicprod
sonicprod / RPi4.MAME.Appliance.md
Last active April 4, 2025 04:47
How to make a dedicated MAME Appliance on a Raspberry Pi 4B | Comment réaliser un système MAME dédié sur un Raspberry Pi 4/Pi 400

How to make a dedicated MAME Appliance on a Raspberry Pi 4/Pi 400

Note: the following steps are written in French. Feel free to translate to English.

However, please take notice that if you copy the scripts on this page from the version translated into English by Google Translate, it is possible that extra characters may appear within some scripts (this is caused by Google Translate), resulting in corruption of the impacted scripts. Consequently, it is better to copy the scripts from the original French version of this page.

Comment réaliser un système MAME dédié sur un Raspberry Pi 4/Pi 400

@keztricks
keztricks / gbdc_mac_dev.md
Last active April 16, 2025 21:32
Developing in gbdc on Mac

I've been following GamingMonsters's gbdk Gameboy Dev tutorial (it's rad! https://www.youtube.com/playlist?list=PLeEj4c2zF7PaFv5MPYhNAkBGrkx4iPGJo).

Was doing this for my own reference, but thought I may as well flesh out & share I'm on MacOS, so have put together anywhere I've had to do something different, I'm up to Session 10, so will update if anything further comes along as we progress.

Quick heads up, before you run anything here make sure you know what it's doing, this all worked fine and dandy for me, but I'm not making any promises!

"Hello World" - Part 1

Installing gdbk

@CowThing
CowThing / pixel_perfect.gd
Last active November 26, 2024 16:58
Pixel perfect scaling script for Godot 3.1
extends Node
"""
An autoload singleton for pixel perfect rendering of the game.
Set this script as an autoload.
`base_size` - Is the target size of the viewport. The viewport will scale up to fit the largest
possible integer multiple of this size within the window.
`expand` - If true the viewport will expand to the edges of the window after scaling up.
@atomius0
atomius0 / PixelPerfectScaling.gd
Created March 12, 2018 16:29
Pixel-Perfect scaling script, ported to Godot 3.
# original code by CowThing: https://github.com/godotengine/godot/issues/6506
# port to Godot 3 and bugfixes by atomius.
# usage:
# set this script as AutoLoad (Singleton enabled)
#
# in the project settings:
# [display]
# set 'window/size/width' and 'window/size/height' to your desired render resolution.
# set 'window/size/test_width' and 'window/size/test_height' to the initial window size.
@GrayJack
GrayJack / config.txt
Last active May 15, 2025 22:25
Very complete and documented config.txt file for raspberry pi
# See /boot/overlays/README for all available options
##############################################################################
## Raspberry Pi Configuration Settings
##
## Revision 18, 2018/03/05
##
## Details taken from the eLinux wiki
## For up-to-date information please refer to wiki page.
##
## Wiki Location : http://elinux.org/RPiconfig