Skip to content

Instantly share code, notes, and snippets.

View EthanRDoesMC's full-sized avatar

Ethan Chaffin EthanRDoesMC

View GitHub Profile
@VITALISED
VITALISED / instructions.md
Last active October 12, 2023 07:38
Hacky Instructions for compiling modern NMS Shaders

Instructions

Install a copy of glslc you can get this from https://github.com/google/shaderc google's shaderc repository.

Clone a copy of your preferred leaked NMS shaders, for this gist I'm using the ones at https://github.com/EthanRDoesMC/NMS-ShaderCode

The repository contains the build targets (the .BIN files in the top level) and the actual shaders (the glsl header files in the code directory)

When compiling a shader you'll need to know what target you're building. For example if you were to edit the Binoculars, the target in UI.SHADER.BIN for binoculars is:

@Nielk1
Nielk1 / ExtendInput.DataTools.DualSense.TriggerEffectGenerator.cs
Last active May 1, 2024 22:32
Factories for all DualSense trigger effects
/*
* MIT License
*
* Copyright (c) 2021-2022 John "Nielk1" Klein
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
@ygit
ygit / gist:ff8b591b7373ba740a04
Created November 3, 2015 08:18
Get Average Color of UIImage
- (UIColor *)getAverageColor:(UIImage *)image{
CGSize size = {1, 1};
UIGraphicsBeginImageContext(size);
CGContextRef ctx = UIGraphicsGetCurrentContext();
CGContextSetInterpolationQuality(ctx, kCGInterpolationMedium);
[image drawInRect:(CGRect){.size = size} blendMode:kCGBlendModeCopy alpha:1];
uint8_t *data = CGBitmapContextGetData(ctx);
UIColor *color = [UIColor colorWithRed:data[2] / 255.0f
green:data[1] / 255.0f