Skip to content

Instantly share code, notes, and snippets.

View devshgraphicsprogramming's full-sized avatar

Mateusz Kielan devshgraphicsprogramming

View GitHub Profile
@devshgraphicsprogramming
devshgraphicsprogramming / bait.md
Created October 23, 2023 22:48
Don't even dream of reprojecting last frame depth for occlusion culling, you will fail!

Originally posted as a reply to: https://gist.github.com/reduz/c5769d0e705d8ab7ac187d63be0099b5

Turned into a gist due to high likelihood of deletion. Also edited down to not include irrelevant trolling as to be useful to someone else considering Depth Reprojection.

Yes I know SSR and Parallax Corrected Shadowmaps work, but the consequences of errors in those depth tests aren't as high.

Lack of Generality (oh the irony)

You yourself state that this is general purpose engine, how is a technique that will have trouble with:

  • deformables (cloth, vegetation, skinned meshes, etc.)
@devshgraphicsprogramming
devshgraphicsprogramming / preprocess_this.hlsl
Created October 27, 2023 18:02
Clang 3.7 Preprocessor Stress Test
This file has been truncated, but you can view the full file.
#define NBL_GLSL_LIMIT_MAX_IMAGE_DIMENSION_1D 32768
#define NBL_GLSL_LIMIT_MAX_IMAGE_DIMENSION_2D 32768
#define NBL_GLSL_LIMIT_MAX_IMAGE_DIMENSION_3D 16384
#define NBL_GLSL_LIMIT_MAX_IMAGE_DIMENSION_CUBE 32768
#define NBL_GLSL_LIMIT_MAX_IMAGE_ARRAY_LAYERS 2048
#define NBL_GLSL_LIMIT_MAX_BUFFER_VIEW_TEXELS 134217728
#define NBL_GLSL_LIMIT_MAX_UBO_SIZE 65536
#define NBL_GLSL_LIMIT_MAX_SSBO_SIZE 4294967295
#define NBL_GLSL_LIMIT_MAX_PUSH_CONSTANTS_SIZE 256
#define NBL_GLSL_LIMIT_MAX_MEMORY_ALLOCATION_COUNT 4096
# 0 "/app/example.cpp"
# 1 "/app//"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/opt/compiler-explorer/arm64/gcc-trunk-20231027/aarch64-unknown-linux-gnu/aarch64-unknown-linux-gnu/sysroot/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "/app/example.cpp"
# 1 "/app/example.cpp"
# 1 "D:\\work\\Nabla\\examples_tests\\48.ArithmeticUnitTest\\hlsl\\shaderCommon.hlsl"
# 1 "D:\\work\\Nabla\\examples_tests\\48.ArithmeticUnitTest\\hlsl\\common.hlsl"