add game&rawdata

This commit is contained in:
Vasily Petrov 2026-06-17 23:06:51 +03:00
parent 0133cd976c
commit 49b34b5546
45731 changed files with 709831 additions and 0 deletions

View file

@ -0,0 +1,19 @@
#ifndef FENCODE_H
#define FENCODE_H
#include "common.h"
//////////////////////////////////////////////////////////////////////////////////////////
uniform float3 v_encodeZ01;
uniform float3 v_decodeZ01;
float3 encode_tcRG ( float z ) { return z*v_encodeZ01.xyz; }
float2 encode_tcB ( float z ) { return z*v_encodeZ01.z; }
//////////////////////////////////////////////////////////////////////////////////////////
// 0..1 encoding with 21 bit precision
static const float3 pe_scale = {1.f, 128.f, 16384.f };
static const float3 pe_unscale21 = {2.f/1.f, 2.f/128.f, 2.f/16384.f };
static const float3 pe_unscale24 = {1.f/1.f, 1.f/256.f, 1.f/65536.f };
float decode_float21 ( float3 rgb) { return dot ( rgb, pe_unscale21); }
float decode_float24 ( float3 rgb) { return dot ( rgb, pe_unscale24); }
#endif