Skip to content

Instantly share code, notes, and snippets.

View julcst's full-sized avatar
🧑‍🎓
Studying

Julian Stamm julcst

🧑‍🎓
Studying
View GitHub Profile
@jdupuy
jdupuy / SampleVndf_GGX.cpp
Last active September 24, 2024 15:22
Sampling Visible GGX Normals with Spherical Caps
// Helper function: sample the visible hemisphere from a spherical cap
vec3 SampleVndf_Hemisphere(vec2 u, vec3 wi)
{
// sample a spherical cap in (-wi.z, 1]
float phi = 2.0f * M_PI * u.x;
float z = fma((1.0f - u.y), (1.0f + wi.z), -wi.z);
float sinTheta = sqrt(clamp(1.0f - z * z, 0.0f, 1.0f));
float x = sinTheta * cos(phi);
float y = sinTheta * sin(phi);
vec3 c = vec3(x, y, z);
@maxwellmlin
maxwellmlin / LPX-Trial-Reset.sh
Created April 14, 2021 03:46
Logic Pro X Trial Reset
mv -v ~/Library/Application\ Support/.lpxuserdata ~/.Trash
@MulattoKid
MulattoKid / CUDA-OpenGL Interoperability.md
Created April 29, 2018 19:48
CUDA-OpenGL Interoperability

Intro #1

I recently decided that I should start to work on my own path tracing "engine" and so here we are. I will try to share as much as possible without it just becoming too much to read. Hopefully what I write will be of some use to others who might run into the same problems I do during this process. Just as a quick disclaimer, here is my setup which I plan to use for throughout the project (hate it or love it, this is what I'm working with):

  • Windows 10
  • Intel i7-6700K @4.2GHz
  • Nvidia GTX 970 (4GB)
  • 16GB RAM
  • Microsoft Visual Studio Community 2017
  • CUDA Toolkit 9.0
  • OpenGL 4.3 (I will occasionally work from my laptop which does not support v4.5)
  • SDL 2.0
@Kos
Kos / formats.txt
Last active June 24, 2024 15:42
OpenGL image formats along with their unsized variants and preferred formats for pixel transfer (Written by hand, needs verification) Pixel store for compressed textures not provided because there are glCompressedTexImage and family for them. EXT_texture_compression_s3tc formats not included.
| Image format (sized) | Unsized | Compr | Pixel format | Pixel type |
|---------------------------------------|--------------------|-------|--------------------|-----------------------------------|
| GL_R8 | GL_RED | False | GL_RED | GL_UNSIGNED_BYTE |
| GL_R8_SNORM | GL_RED | False | GL_RED | GL_BYTE |
| GL_R16 | GL_RED | False | GL_RED | GL_UNSIGNED_SHORT |
| GL_R16_SNORM | GL_RED | False | GL_RED | GL_SHORT |
| GL_R32F | GL_RED | False | GL_RED | GL_FLOAT |
| GL_R8I | GL_RED | False | GL_RED_INTEGER | GL_INT |