Skip to content

Instantly share code, notes, and snippets.

@atyuwen
atyuwen / opt_fsr.fxh
Last active May 17, 2024 11:09
An optimized AMD FSR implementation for Mobiles
//==============================================================================================================================
// An optimized AMD FSR's EASU implementation for Mobiles
// 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 FsrEasuL(
out AH3 pix,
@antiagainst
antiagainst / adreno-perfcounter.c
Last active June 15, 2023 19:19
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 May 17, 2024 05:02
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

@JoseEmilio-ARM
JoseEmilio-ARM / GPUOptimizationForGames.md
Last active January 31, 2024 16:56 — forked from silvesthu/GPUOptimizationForGameDev.md
GPU Optimization for Games
@sebbbi
sebbbi / FastUniformLoadWithWaveOps.txt
Last active May 11, 2024 07:37
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 25, 2023 09:24
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 February 19, 2024 18:09
Fabian's Recommened Reading List