- 2011 - A trip through the Graphics Pipeline 2011
- 2013 - Performance Optimization Guidelines and the GPU Architecture behind them
- 2015 - Life of a triangle - NVIDIA's logical pipeline
- 2015 - Render Hell 2.0
- 2016 - How bad are small triangles on GPU and why?
- 2017 - GPU Performance for Game Artists
- 2019 - Understanding the anatomy of GPUs using Pokémon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package vendor_wgpu_example_fontstash | |
| import intr "base:intrinsics" | |
| import "core:fmt" | |
| import "core:math/linalg" | |
| import sa "core:container/small_array" | |
| import fs "vendor:fontstash" | |
| import "vendor:wgpu" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Port of some collision functions to Odin by Jakub Tomšů. | |
| // | |
| // from Real-Time Collision Detection by Christer Ericson, published by Morgan Kaufmann Publishers, © 2005 Elsevier Inc | |
| // | |
| // This should serve as an reference implementation for common collision queries for games. | |
| // The goal is good numerical robustness, handling edge cases and optimized math equations. | |
| // The code isn't necessarily very optimized. | |
| // | |
| // There are a few cases you don't want to use the procedures below directly, but instead manually inline the math and adapt it to your needs. | |
| // In my experience this method is clearer when writing complex level queries where I need to handle edge cases differently etc. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is a small program to print a number of known paths in Windows. | |
| // Savegame files should be in FOLDERID_SavedGames! | |
| // SHGetKnownFolderPath should probably be used only for compatibility. | |
| // | |
| // Compile with `cl pathtest.c` | |
| // | |
| // Day created: 02.08.2023 | |
| // Version: Windows 10 pro 22H2 | |
| // | |
| // Output on my machine: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package ease | |
| // Adapted from functions here: https://github.com/warrenm/AHEasing/blob/master/AHEasing/easing.c | |
| // For previews go here: https://easings.net/ | |
| import "core:math" | |
| Mode :: enum { | |
| linear = 0, | |
| quad_in, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Simple bitarray example | |
| // ----------------------- | |
| // Warning: no bounds checking | |
| // Usually I'd use 'uint8_t' instead of an 'char' and 'size_t' instead of an 'int', | |
| // but this way it can be copied anywhere without worrying about includes. | |
| static inline int bitarray_get(const char* bitarray, const int index) { | |
| return ((bitarray[index / 8]) >> (index % 8)) & 1; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ---------------------------------------------------------------------------- | |
| // constexpr_hash_murmur.h | |
| // ---------------------------------------------------------------------------- | |
| // compile time string hashing(murmur hash equivalent). | |
| // @see also https://sites.google.com/site/murmurhash/ | |
| #pragma once | |
| #include <stdint.h> | |
| #if defined(_MSC_VER) | |
| #pragma warning (push) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY | |
| ;by doppelganger (doppelheathen@gmail.com) | |
| ;This file is provided for your own use as-is. It will require the character rom data | |
| ;and an iNES file header to get it to work. | |
| ;There are so many people I have to thank for this, that taking all the credit for | |
| ;myself would be an unforgivable act of arrogance. Without their help this would | |
| ;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into | |
| ;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
NewerOlder