Skip to content

Instantly share code, notes, and snippets.

View saada2006's full-sized avatar

Saad Amin saada2006

  • Georgia Institute of Technology
  • Fremont, CA
View GitHub Profile
@rtryan98
rtryan98 / Graphics and Engine development.md
Last active July 14, 2024 15:27
Talks, Posts, Papers and more for Graphics and (Game) Engine Development
@LVutner
LVutner / LabPBR template
Last active September 29, 2023 15:22
LabPBR unpacking template (1.3)
//Sample textures
vec4 albedo_tex = texture2D(texture, texcoord);
vec4 normal_tex = texture2D(normals, texcoord);
vec4 specular_tex = texture2D(specular, texcoord);
//Gamma correction - Optional if you're not doing gamma correct lighting
albedo_tex.xyz = pow(albedo_tex.xyz, vec3(2.2));
//Normals
vec3 normal;
@kosua20
kosua20 / gist:0c506b81b3812ac900048059d2383126
Created March 18, 2017 18:35
NVIDIA FXAA 3.11 by TIMOTHY LOTTES
/*============================================================================
NVIDIA FXAA 3.11 by TIMOTHY LOTTES
------------------------------------------------------------------------------
COPYRIGHT (C) 2010, 2011 NVIDIA CORPORATION. ALL RIGHTS RESERVED.
------------------------------------------------------------------------------
TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THIS SOFTWARE IS PROVIDED
/*
Thanks to whomever wrote the shader at http://glslsandbox.com/e#36146.5. My code is based off of their's.
*/
#define INCLUDED_ATMOSCATTERING
#define ATMOSPHERIC_SCATTERING // Swaps out the sky gradient for a proper atmospheric scattering model. Atmospheric scattering models how light would interact with an actual atmosphere, producing realistic colours as the sun nears the horizon.
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active July 18, 2024 17:48
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@sheredom
sheredom / VkComputeSample
Created May 29, 2016 19:14
A simple Vulkan compute sample
// This is free and unencumbered software released into the public domain.
//
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
//
// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit
@popcorn245
popcorn245 / hue_colors.md
Last active December 10, 2023 03:10
XY Color Conversion

FROM HUE DESIGN DOCS

https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/blob/00187a3db88dedd640f5ddfa8a474458dff4e1db/ApplicationDesignNotes/RGB%20to%20xy%20Color%20conversion.md

#Conversion between RGB and xy in the CIE 1931 colorspace for hue The conversion between RGB and xy in the CIE 1931 colorspace is not something Philips invented, but we have an optimized conversion for our different light types, like hue bulbs and LivingColors. It is important to differentiate between the various light types, because they do not all support the same color gamut. For example, the hue bulbs are very good at showing nice whites, while the LivingColors are generally a bit better at colors, like green and cyan.

@neuro-sys
neuro-sys / thread.c
Created November 22, 2015 20:26
POSIX/Windows Threads Wrapper
#include "thread.h"
#include <stdio.h>
#ifdef __WIN32__
#include <windows.h>
#else
#include <pthread.h>
#include <stdlib.h>
#endif // __WIN32__
@armornick
armornick / playwav.c
Created August 24, 2012 07:31
Play a sound with SDL2 (no SDL_Mixer)
#include <SDL2/SDL.h>
#define MUS_PATH "Roland-GR-1-Trumpet-C5.wav"
// prototype for our audio callback
// see the implementation for more information
void my_audio_callback(void *userdata, Uint8 *stream, int len);
// variable declarations
static Uint8 *audio_pos; // global pointer to the audio buffer to be played
@fmela
fmela / stacktrace.cxx
Last active September 22, 2023 10:58
A C++ function that produces a stack backtrace with demangled function & method names.
/*
* Copyright (c) 2009-2017, Farooq Mela
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright