Skip to content

Instantly share code, notes, and snippets.

@atyuwen
atyuwen / opt_fsr.fxh
Last active April 7, 2025 08:24
An optimized AMD FSR implementation for Mobiles
//==============================================================================================================================
// An optimized AMD FSR 1.0 implementation for Mobiles
// EASU and RCAS are combined in a single pass.
// Based on https://github.com/GPUOpen-Effects/FidelityFX-FSR/blob/master/ffx-fsr/ffx_fsr1.h
// Details can be found: https://atyuwen.github.io/posts/optimizing-fsr/
// Distributed under the MIT License. Copyright (c) 2021 atyuwen.
// -- FsrEasuSampleH should be implemented by calling shader, like following:
// AH3 FsrEasuSampleH(AF2 p) { return MyTex.SampleLevel(LinearSampler, p, 0).xyz; }
//==============================================================================================================================
void FsrMobile(
@antiagainst
antiagainst / adreno-perfcounter.c
Last active May 23, 2024 11:12
Adreno Perf Counter Queries
#include <fcntl.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
#define ADRENO_IOC_TYPE 0x09
#define ADRENO_PERFCOUNTER_GROUP_SP 0xA
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active April 24, 2025 05:27
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@pixelsnafu
pixelsnafu / CloudsResources.md
Last active April 24, 2025 05:36
Useful Resources for Rendering Volumetric Clouds

Volumetric Clouds Resources List

  1. A. Schneider, "Real-Time Volumetric Cloudscapes," in GPU Pro 7: Advanced Rendering Techniques, 2016, pp. 97-127. (Follow up presentations here, and here.)

  2. S. Hillaire, "Physically Based Sky, Atmosphere and Cloud Rendering in Frostbite" in Physically Based Shading in Theory and Practice course, SIGGRAPH 2016. [video] [course notes] [scatter integral shadertoy]

  3. [R. Högfeldt, "Convincing Cloud Rendering – An Implementation of Real-Time Dynamic Volumetric Clouds in Frostbite"](https://odr.chalmers.se/hand

@JoseEmilio-ARM
JoseEmilio-ARM / GPUOptimizationForGames.md
Last active January 3, 2025 11:50 — forked from silvesthu/GPUOptimizationForGameDev.md
GPU Optimization for Games
@sebbbi
sebbbi / FastUniformLoadWithWaveOps.txt
Last active April 26, 2025 10:27
Fast uniform load with wave ops (up to 64x speedup)
In shader programming, you often run into a problem where you want to iterate an array in memory over all pixels in a compute shader
group (tile). Tiled deferred lighting is the most common case. 8x8 tile loops over a light list culled for that tile.
Simplified HLSL code looks like this:
Buffer<float4> lightDatas;
Texture2D<uint2> lightStartCounts;
RWTexture2D<float4> output;
[numthreads(8, 8, 1)]
@selftaught
selftaught / ret2libc.md
Last active January 23, 2025 10:49
ret2libc stack overflow

Exploiting a Stack Buffer Overflow (return-to-libc attack)

A stack buffer overflow occurs when a program writes to a memory address on it's call stack outside of the intended structure / space.

In this walk-through, I'm going to cover the ret2libc (return-to-libc) method. This method of exploitation is great because it doesn't require the use of your typical shellcode. It involves making sys calls to the functions provided to us by libc (standard c library). We're going to use the system and exit sys calls for demonstration.

To have a good understanding about how stack overflows work, it's extremely helpful to know how stack data structures work, and more importantly - how the call stack works. For the sake of time, I'm not going to type out how these two things work in great detail. If you want to know how these work, I would recommend watching stack and call stack.

Creating a vulnerable binary to test

@djg
djg / reading-list.md
Last active March 21, 2025 08:41
Fabian's Recommened Reading List