跳到正文
cccskills
免费在 GitHub 公开

hdr-color-contract

Kern HDR/color pipeline contract: scene-referred linear working space, paper white units, radiance format rules, URP output transform ownership, DisplayFinal perceptual/linear space, UI brightness, HDR calibration screen, safe-start HDR switch, and HDROutputController usage. Use when touching lighting shaders, glow, bloom, tonemapping, post-processing, color grading, LUT, display output, UI colors, calibration, or any code with DisplaySettings / HDROutput / PaperWhite / Tonemapping / CompositeFinal / DisplayFinal / VisualTuning. Triggers on: saturate on radiance, clamp color, sRGB in shader, UNorm light buffer, ARGBHalf, paper white, HDROutputReconciler, VisualTuning, BT2390, detectPaperWhite, HDRCalibrationScreen, HDRSwitchPending, HDROutputSettings.

中文简介正在准备中。当前显示原文说明。

MinesReborn/Fodislop星标 4(GitHub 4 + cccskills 0)

实测评分 未实测

查看安装方法

包含的文件(1)

  • SKILL.md5.0 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

Color, brightness, and HDR

This is a contract, not a recommendation. Every number in the render must have a known color space and a known unit.

Brightness unit

The working color space of the scene is linear, scene-referred, with no upper bound. 1.0 is reference white, i.e. the display's paper white (DisplaySettings.PaperWhiteNits, 100–400, defaulting from PostProcessLook.DisplayCalibration). A lamp at 8.0 means eight paper-white units — not an error and not "needs clamping". The range above 1.0 belongs to light sources, fire, arcs, flashes, and specular highlights.

Prohibitions (each silently kills HDR)

  • FORBIDDEN to cap radiance from above: saturate, clamp(x, 0, 1), min(x, 1.0) on scene color, lighting, glow, bloom. saturate is permitted only on values that are by definition in 0..1: albedo, alpha, masks, coefficients, coordinates.
  • FORBIDDEN to apply gamma or sRGB encoding inside lighting shaders. Textures flagged sRGB are decoded by the GPU once, at sample time, and nowhere else.
  • FORBIDDEN to store radiance in UNorm format. Everything carrying light uses ARGBHalf or higher (_RadianceDirect, _RadianceBounce, _WorldLightTexture, _StaticGlowField). ARGB32 is allowed only for masks and coefficients (_LightingMaterialField, AO).
  • FORBIDDEN to treat HDR as a separate artistic render ("take an SDR image and multiply by brightness"). SDR and HDR are one scene-referred master with different output transforms applied at the final step.

Output transform

Done by URP, not us: HDROutputReconciler holds a runtime Volume with Tonemapping in Neutral mode, BT.2390 range compression, detectPaperWhite/detectBrightnessLimits disabled. The same Volume carries ColorAdjustments.postExposure (PostProcessLook.Exposure.Stops), so URP applies it right before its own curve. Adding a custom tone transform on top of URP produces double-mapping and is FORBIDDEN.

Frame order (PostProcess.compute)

scene → world-grid bloom (WorldBloom.compute + WorldBloomAdd.shader) → URP: ColorAdjustments.postExposure (+1 stop, PostProcessLook.Exposure) and Neutral tonemapping → DisplayFinal: divide by paper white → server LUT (ApplyCubeLut, HDR-normalized) → vignette → eigengrau → multiply by paper white in ToDisplayOutput → PQ/scRGB encoding done by URP.

With the world render grid active, DisplayFinal runs per world pixel: eigengrau stays on that lattice, but the vignette is applied by the URP final blit per screen pixel on the scene sample (WorldGridFinalVignette.hlsl), before UI composition; DisplayFinal only computes its mask for the debug view.

Color space inside DisplayFinal

After the paper-white division the frame is linear relative to screen white, not sRGB-encoded — URP encodes after us. Therefore:

  • Colors/thresholds specified as encoding-level values (e.g. #16161D) are converted to linear via PerceptualToLinear at the point of application.
  • Frame brightness is compared via LinearToPerceptual.
  • Light addition happens in linear space.

Pre-converting constants "forward" in C# is FORBIDDEN: #16161D must appear in code as #16161D.

UI

Interface white equals paper white, not peak brightness. A menu at 1000 nits is a defect.

Calibration

detectPaperWhite and detectBrightnessLimits are disabled; white point and peak come from user settings. Source is HDRCalibrationScreen with a pattern from the output pass (_CalibrationPattern in PostProcess.compute). Rendering calibration samples via UI is FORBIDDEN: UI white equals paper white and cannot represent peak brightness.

Safe start

Switching output mode sets DisplaySettings.HDRSwitchPending and writes the file immediately (Save, not SaveDeferred). A flag found at startup means the switch was never confirmed — the game starts in SDR. Applying a saved output mode bypassing this check is FORBIDDEN: a user with an incompatible output would otherwise be stuck on a black screen.

HDR detection

Output state is read only via HDROutput / HDROutputController. Querying HDROutputSettings.main directly from game code is FORBIDDEN, as is calling RequestHDRModeChange outside the controller.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.

中文简介正在准备中。当前显示原文说明。

MinesReborn/Fodislop42026年10月26日 更新

Build and operate a live game using Unity Services. Use when the user needs to implement, connect, or debug backend-driven features — battle passes, achievements, player progression, cloud saves, leaderboards, matchmaking, virtual economies, server-authoritative logic, anti-cheat, player accounts and authentication, remote configuration, feature flags, A/B testing, analytics, or cloud resource deployment. Triggers on live-ops, live service, backend, server authority, cloud code, cloud save, remote config, player data, retention, monetization loop, season pass, ranking, multiplayer sessions, lobbies, or any Unity Services integration.

中文简介正在准备中。当前显示原文说明。

MinesReborn/Fodislop42026年10月26日 更新

Kern engine critical invariants: coordinate system, UI Toolkit positioning, RenderTexture blit, LifetimeScope/scene structure, VolumeProfile editor API, camera pixel-grid alignment, performance analysis rules, profiler interpretation, and the no-fallback policy. Use when touching coordinates, WorldToScreen, UI element anchoring, RenderTexture, LifetimeScope, VolumeProfile, camera, FPS analysis, Profiler markers, or any code near an "invariant" comment. Triggers on: CoordinateUtils, MapManager.WorldHeight, RuntimePanelUtils, CameraTransformWorldToPanel, WorldToLocal, PositionWriteEpsilon, CameraPixelGridAligner, LifetimeScope, RegisterComponent, VolumeProfile, AssetDatabase.AddObjectToAsset, EditorLoop, VSync, fallback, paper white, FPS, frame time.

中文简介正在准备中。当前显示原文说明。

MinesReborn/Fodislop42026年10月26日 更新

Kern project C# conventions, namespace rules, DI/VContainer patterns, and assembly layer boundaries. Use when writing, editing, or reviewing any C# file — MonoBehaviours, ScriptableObjects, services, contracts, factories, or editor scripts. Triggers on: namespace, nullable, asmdef, VContainer, RegisterComponent, IObjectResolver, composition root, Kern.Contracts, primary constructor, record struct, SA1513, _camelCase, PascalCase, asmref, MonoScript.GetClass.

中文简介正在准备中。当前显示原文说明。

MinesReborn/Fodislop42026年10月26日 更新

fmod-sync

免费

Synchronize and compile FMOD Studio banks into StreamingAssets

中文简介正在准备中。当前显示原文说明。

MinesReborn/Fodislop42026年10月26日 更新

Implement, configure, and debug Unity In-App Purchases (IAP) — store connection, product catalog, consumable/non-consumable/subscription purchases, two-step pending-confirm flow, receipt validation, entitlement checking, restore transactions, Apple extensions (promotional purchases, Ask-to-Buy, code redemption), and Google Play extensions (subscription upgrade/downgrade), D2C Capabilities(direct to customer), 3rd party payment provider (Stripe/Coda) via Unity IAP/Unity Cloud. Use when the user needs to add, modify, debug, or migrate from native Android/iOS billing, 3rd party packages(RevenueCat/Adapty/Essential Kit/Unipay supported) to IAP. Triggers on microtransactions (MTX), monetization, real-money purchases, store purchases, buying items, support D2C, purchase via Stripe/Coda, migrate from native billing(Google's BillingClient or Apple's StoreKit/SKPaymentQueue/SKProduct)/RevenueCat/Adapty/EssentialKit/Unipay.

中文简介正在准备中。当前显示原文说明。

MinesReborn/Fodislop42026年10月26日 更新

查看 MinesReborn 的全部技能

报告此技能的问题