Skip to content

Instantly share code, notes, and snippets.

View meirbon's full-sized avatar
🌠
Tracing rays

Mèir meirbon

🌠
Tracing rays
View GitHub Profile
@cart
cart / FXAA.tscn
Last active January 30, 2024 18:17
Godot Nvidia FXAA 3.11 Port
[gd_scene load_steps=3 format=2]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
// Godot Nvidia FXAA 3.11 Port
// Usage: Drop this in to any 3D scene for FXAA! This is a port of the \"PC High Quality Preset 39\". However the medium quality
// parameters are also included. For medium quality, just comment out sections \"PS 6\" and above and uncomment the \"med 13\" variables.
@CoolOppo
CoolOppo / Cargo.toml
Last active January 2, 2024 10:27
How to compile to a DLL in rust while using it as a normal rust library
[package]
name = "test"
version = "0.1.0"
authors = ["YOU <YOU@users.noreply.github.com>"]
edition = "2018"
[lib]
crate-type = ["cdylib"]
@romainguy
romainguy / d_ggx.glsl
Last active October 26, 2023 06:18
D_GGX in mediump/half float
// From https://github.com/google/filament
float D_GGX(float linearRoughness, float NoH, const vec3 h) {
// Walter et al. 2007, "Microfacet Models for Refraction through Rough Surfaces"
// In mediump, there are two problems computing 1.0 - NoH^2
// 1) 1.0 - NoH^2 suffers floating point cancellation when NoH^2 is close to 1 (highlights)
// 2) NoH doesn't have enough precision around 1.0
// Both problem can be fixed by computing 1-NoH^2 in highp and providing NoH in highp as well
// However, we can do better using Lagrange's identity:
@khoa-io
khoa-io / .clang-format
Created August 11, 2017 15:50
"Visual Studio" clang-format style
---
Language: Cpp
# BasedOnStyle: LLVM
AccessModifierOffset: -2
AlignAfterOpenBracket: Align
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: false
AlignOperands: true
AlignTrailingComments: true
@jchandra74
jchandra74 / PowerShell Customization.md
Last active March 1, 2024 01:02
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@jordi-t
jordi-t / disable-dgpu-xps9560-ubuntu-1610
Last active October 8, 2022 13:57
Disabling dGPU on Dell XPS 9560 on Ubuntu 16.10
# Tested with kernel: 4.9.20-040920-generic
#
# Make sure to install following packages
#
sudo apt install acpi acpi-call-dkms
#
# To manually disable, you can run the following command
#
@grahamc
grahamc / nixos-on-dell-9560.org
Last active December 1, 2017 22:02
NixOS on a Dell 15" 9560 with the 4K screen.
@whizzzkid
whizzzkid / XPS-15 9560 Getting Nvidia To Work on KDE Neon
Last active December 3, 2022 15:43
[XPS 15 Early 2017 9560 kabylake] Making Nvidia Drivers + (CUDA 8 / CUDA 9 / CUDA 9.1) + Bumblebee work together on linux ( Ubuntu / KDE Neon / Linux Mint / debian )
# Instructions for 4.14 and cuda 9.1
# If upgrading from 4.13 and cuda 9.0
$ sudo apt-get purge --auto-remove libcud*
$ sudo apt-get purge --auto-remove cuda*
$ sudo apt-get purge --auto-remove nvidia*
# also remove the container directory direcotory at /usr/local/cuda-9.0/
# Important libs required with 4.14.x with Cuda 9.X
$ sudo apt install libelf1 libelf-dev