Skip to content

Instantly share code, notes, and snippets.

View Erfan-Ahmadi's full-sized avatar

Erfan Erfan-Ahmadi

View GitHub Profile
@Erfan-Ahmadi
Erfan-Ahmadi / rendering_engine.md
Last active March 19, 2024 03:46
Rendering Engine Development

1. What does the Rendering Engine Need?

  • Rendering Engine
    • Support for Multiple Graphics APIs : OpenGL | Vulkan | DirectX12 | DirectX11 | Metal
    • Content Export Pipeline : Create Maya/Max Plugins to export meshes based on Renderers needs. (Assimp Commercial Licence -> Pay)
    • Texture Compression Libraries
    • Material System : Artists Configure shaders, textures, parameters to import in game
    • Game-side Manager of Models/Materials/Lights
    • Good Visibility System (Frustum/Occlusion) (VisibilityBuffers?)
    • Multi-Threded Submission System to reduce cost of submission to GPU
  • Lighting/Shadow Rendering System
@Erfan-Ahmadi
Erfan-Ahmadi / sampling_hlsl_to_glsl_find_and_replace_regex
Created November 6, 2019 12:27
Regex for sampler when translating HLSL to GLSL
Find: (\w*).Sample\((\w*)
Replace: texture(sampler2D($1, $2)
@Erfan-Ahmadi
Erfan-Ahmadi / Bokeh-DOF
Last active March 13, 2024 16:44
Bokeh Depth Of Field Resources
GPU Gems 1 - Chapter 23. Depth of Field: A Survey of Techniques
GPU Gems 2
GPU Gems 3 - Chapter 28. Practical Post-Process Depth of Field
GPU Pro 1 - Realistic Depth of Field in Post-Production
GPU Pro 2 - Post-Proccessing Effects on Mobile Devices
GPU Pro 3 -
GPU Pro 4 - Images Space -> First Two Chapters
GPU Pro 5 - 241 - Bokeh Effects on The SPU
GPU Pro 6 -
@Erfan-Ahmadi
Erfan-Ahmadi / rsa_sign
Created September 24, 2019 07:39
OpenSSL Digital Signature Code (Sign/Verify)
#include <openssl/aes.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <stdio.h>
#define KEY_LENGTH 2048
@Erfan-Ahmadi
Erfan-Ahmadi / Cube Vertices ASCII Art
Created August 23, 2019 18:57
Used To Describe cube vertices in code for better visualization/
// .4------5 4------5 4------5 4------5 4------5.
// .' | .'| /| /| | | |\ |\ |`. | `.
// 0---+--1' | 0-+----1 | 0------1 | 0----+-1 | `0--+---1
// | | | | | | | | | | | | | | | | | |
// | ,6--+---7 | 6----+-7 6------7 6-+----7 | 6---+--7 |
// |.' | .' |/ |/ | | \| \| `. | `. |
// 2------3' 2------3 2------3 2------3 `2------3
@Erfan-Ahmadi
Erfan-Ahmadi / the_forge_idea
Created July 24, 2019 16:08
The Forge Unit Test Ideas
The Forge Unit Test Ideas:
- Real-Time Fluid Simulation
- Ambient Occlusion
- Volumetric Fog and Lighting
- Volumetric Light Effects
- Physically Based Clouds
- Subsurface scattering
- Volume Shadow / Shadow Maps
- Bump Mapping / Parallax Mapping / Displacement mapping
- Occlusion Culling (Visibility Test)
@Erfan-Ahmadi
Erfan-Ahmadi / update_all.sh
Created May 11, 2019 03:13
Update All Repositories In Folders
find . -mindepth 1 -maxdepth 2 -type d -print -exec git -C {} pull \;
pause