mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 06:09:58 -04:00
Describe what the code does in comments and docs.
Comments say what the code does and why, docs/maxwell.md keeps the Maxwell facts, and fetch_refs.sh clones only the checkout the build reads. Code is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// Texels past the right or bottom edge repeat the last column or row.
|
||||
//
|
||||
// Colour: the BC1 four-colour block of the box around the block's colours, its diagonal turned to the sign of the
|
||||
// colours' covariance and inset by 1/16 of the range (the bounding-box method of stb_dxt and of the hardware's BC1 recompression),
|
||||
// colours' covariance and inset by 1/16 of the range (the bounding-box method),
|
||||
// then each texel takes the nearest of the four palette entries along that axis. Alpha: the eight-value BC3 alpha
|
||||
// block between the block's smallest and largest alpha. The bytes are what the texels hold, so an sRGB image keeps
|
||||
// sRGB-encoded values, as BC3_SRGB expects.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#version 450
|
||||
// Colour adjustment on the present (runtime/vk_color.c): the game's picture, crop rectangle at offset, into an RGBA16F
|
||||
// image the FSR 1 pass or the blit then scales to the window. Brightness, contrast around mid-grey, saturation against
|
||||
// Rec. 709 luma, then a power curve: the order and ranges of STS78721's colour profiles (issue #136).
|
||||
// Rec. 709 luma, then a power curve: the order and ranges of the colour profiles of issue #136.
|
||||
layout(local_size_x = 8, local_size_y = 8) in;
|
||||
layout(binding = 0) uniform sampler2D src;
|
||||
layout(binding = 1, rgba16f) uniform writeonly image2D dst;
|
||||
|
||||
@@ -9,9 +9,8 @@
|
||||
// Hue correction (hdr.z, NX2NAVI_HDR_HUE): the game's SDR clamp turns bright saturated colours towards white (a torch flame
|
||||
// clips red, then green, and reads yellow-white, the colour its emitted light was tuned to); the extended curve keeps
|
||||
// their ratios, so they stay saturated. From the picture's white upwards the colour moves towards the game's own SDR
|
||||
// result at the HDR luminance, by up to hdr.z (RenoDX's NX2navi mod has the same control).
|
||||
// Approach after RenoDX's NX2navi mod by souperman9 and Musa (github.com/clshortfuse/renodx, src/games/nx2navi, MIT): its
|
||||
// "extended vanilla" curve.
|
||||
// result at the HDR luminance, by up to hdr.z.
|
||||
// The approach: an "extended vanilla" curve.
|
||||
// Bindings are those of the game's translated shader: vk_hdr.c rewrites them from the original's names.
|
||||
layout(location = 0) in vec4 uv;
|
||||
layout(location = 0) out vec4 color;
|
||||
|
||||
Reference in New Issue
Block a user