Skip to content

feat: post processing - #350

Merged
alandtse merged 340 commits into
alandtse:devfrom
Dlizzio:agent/post-processing-beta
Jul 28, 2026
Merged

feat: post processing#350
alandtse merged 340 commits into
alandtse:devfrom
Dlizzio:agent/post-processing-beta

Conversation

@Dlizzio

@Dlizzio Dlizzio commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Ports Jiaye's Post Processing pipeline from community-shaders/skyrim-community-shaders#2354, preserving the upstream branch history.
  • Adds depth of field, vignette, exposure, motion blur, physical glare, bloom, lens flare, compositing, color grading, LUT, camera, and border passes.
  • Includes Post Processing in the AIO build as a 1.0.0 beta feature.
  • Uses the existing maturity framework so Post Processing is unloaded on first install and shown with the [BETA] tag.
  • Gates Post Processing shared state and ACEScg output while the feature is unloaded, preventing an inactive beta feature from changing HDR or lighting output.
  • Names imported D3D11 resources and fixes validation-backed shader issues in DoF, LUT, histogram exposure, motion blur, and vignette.

Integration notes

The upstream head was merged into current Open Shaders dev, then conflicts were resolved against the current feature buffer, VR upscaling flow, Vanilla Fresnel state, shared HLSL layout, translations, and version metadata.

Post Processing is packaged in AIO despite autoupload = false through explicit aio = true metadata. Scene Manager remains untouched and feature-agnostic.

Validation

  • Release ALL build completed successfully.
  • 3,312 configured changed-shader permutations: 0 errors, 0 new warnings.
  • 122 Post Processing runtime compute-shader permutations compiled with FXC.
  • Shader unit tests: 166 assertions passed.
  • Localization extraction, orphan detection, and ordering passed.
  • Feature version audit passed with only the expected new Post Processing 1.0.0 entry.
  • Final AIO output deployed to the Open Shaders AIO Test mod and verified by hash.

Runtime visual validation in Skyrim is still pending, so this PR is opened as a draft.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 133 files, which is 33 over the limit of 100.

To get a review, narrow the scope:
• coderabbit review --committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

This review couldn't start because sufficient usage credits or metered capacity aren't available. Add credits or update usage-based reviews in the billing tab, then retry.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 2b88df1a-e250-4ace-b16e-d2b2ba7ec1fc

📥 Commits

Reviewing files that changed from the base of the PR and between ad7dc41 and c837d4e.

⛔ Files ignored due to path filters (9)
  • features/Post Processing/Shaders/PostProcessing/DoF/bokehshapes/cutestar.png is excluded by !**/*.png
  • features/Post Processing/Shaders/PostProcessing/DoF/bokehshapes/fringy_soft_chr_rb.png is excluded by !**/*.png
  • features/Post Processing/Shaders/PostProcessing/DoF/bokehshapes/hex.png is excluded by !**/*.png
  • features/Post Processing/Shaders/PostProcessing/DoF/bokehshapes/hex_fringy_soft.png is excluded by !**/*.png
  • features/Post Processing/Shaders/PostProcessing/DoF/bokehshapes/moyheart.png is excluded by !**/*.png
  • features/Post Processing/Shaders/PostProcessing/DoF/bokehshapes/square.png is excluded by !**/*.png
  • features/Post Processing/textures/rgbnoise.dds is excluded by !**/*.dds
  • features/Post Processing/textures/starburst.dds is excluded by !**/*.dds
  • package/Interface/CommunityShaders/Fonts/fa-solid-900.ttf is excluded by !**/*.ttf
📒 Files selected for processing (133)
  • features/Exponential Height Fog/Shaders/ExponentialHeightFog/ExponentialHeightFog.hlsli
  • features/Exponential Height Fog/Shaders/Features/ExponentialHeightFog.ini
  • features/HDR Display/Shaders/Features/HDRDisplay.ini
  • features/HDR Display/Shaders/HDRDisplay/HDROutputCS.hlsl
  • features/Linear Lighting/Shaders/Features/LinearLighting.ini
  • features/Post Processing/SKSE/Plugins/CommunityShaders/PostProcessing/default.json
  • features/Post Processing/Shaders/Features/PostProcessing.ini
  • features/Post Processing/Shaders/PostProcessing/Border/border.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/Border/border_clear_mv.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/CODBloom/bloom.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/Camera/camera.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/GT7ToneMapping.hlsli
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/OpenDRT.hlsli
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/OpenDRTConfig.hlsli
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/RenoDX.MIT.LICENSE
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/RenoDXToneMapping.hlsli
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/acescc.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/acescct.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/arri.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/castlecsf.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/clamp.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/colorvideovdp.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/convert.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/dtucs.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/gamma.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/gamut.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/ictcp.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/ipt.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/macleod_boynton.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/oklab.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/pq.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/rgb.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/srgb.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/stockman.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/color/ycbcr.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/colorcorrect.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/math.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/math/constants.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/math/cross.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/math/select.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/math/sign.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/tonemap/aces.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/tonemap/frostbite.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/tonemap/hermite_spline.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/tonemap/neutwo.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/Include/renodx/tonemap/psychov_17.hlsl
  • features/Post Processing/Shaders/PostProcessing/ColorGrading/colorgrading.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/Composite/composite.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/DoF/dof.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/HistogramAutoExposure/common.hlsli
  • features/Post Processing/Shaders/PostProcessing/HistogramAutoExposure/histogram.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/LUT/lut.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/LensFlare/lensflare.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/LensFlare/lensflare_fft.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/LocalExposure/localexposure.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/MotionBlur/motionblur_blurpass.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/MotionBlur/motionblur_horizontalpass.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/MotionBlur/motionblur_neighborpass.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/MotionBlur/motionblur_verticalpass.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/PhysicalGlare/aperture.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/PhysicalGlare/composite.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/PhysicalGlare/fft.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/PhysicalGlare/multiply.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/PhysicalGlare/psf.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/PhysicalGlare/threshold.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/Vignette/vignette.cs.hlsl
  • features/Post Processing/Shaders/PostProcessing/common.hlsli
  • features/Post Processing/Shaders/PostProcessing/copy.cs.hlsl
  • features/Subsurface Scattering/Shaders/Features/SubsurfaceScattering.ini
  • features/Subsurface Scattering/Shaders/SubsurfaceScattering/Burley.hlsli
  • features/Terrain Variation/Shaders/Features/TerrainVariation.ini
  • features/Terrain Variation/Shaders/TerrainVariation/TerrainVariation.hlsli
  • include/IconsFontAwesome5.h
  • include/TDM/TrueDirectionalMovementAPI.h
  • package/SKSE/Plugins/CommunityShaders/Translations/en.json
  • package/SKSE/Plugins/CommunityShaders/Translations/zh_CN.json
  • package/Shaders/Common/Color.hlsli
  • package/Shaders/Common/ColorSpaces.hlsli
  • package/Shaders/Common/SharedData.hlsli
  • package/Shaders/ISHDR.hlsl
  • package/Shaders/Lighting.hlsl
  • package/Shaders/Particle.hlsl
  • src/Buffer.h
  • src/Feature.cpp
  • src/FeatureBuffer.cpp
  • src/FeatureCategories.h
  • src/Features/LinearLighting.cpp
  • src/Features/LinearLighting.h
  • src/Features/PostProcessing.cpp
  • src/Features/PostProcessing.h
  • src/Features/PostProcessing/BokehResources.cpp
  • src/Features/PostProcessing/BokehResources.h
  • src/Features/PostProcessing/Border.cpp
  • src/Features/PostProcessing/Border.h
  • src/Features/PostProcessing/CODBloom.cpp
  • src/Features/PostProcessing/CODBloom.h
  • src/Features/PostProcessing/Camera.cpp
  • src/Features/PostProcessing/Camera.h
  • src/Features/PostProcessing/ColorGrading.cpp
  • src/Features/PostProcessing/ColorGrading.h
  • src/Features/PostProcessing/ColorSpace.h
  • src/Features/PostProcessing/Composite.cpp
  • src/Features/PostProcessing/Composite.h
  • src/Features/PostProcessing/DoF.cpp
  • src/Features/PostProcessing/DoF.h
  • src/Features/PostProcessing/HistogramAutoExposure.cpp
  • src/Features/PostProcessing/HistogramAutoExposure.h
  • src/Features/PostProcessing/LUT.cpp
  • src/Features/PostProcessing/LUT.h
  • src/Features/PostProcessing/LensFlare.cpp
  • src/Features/PostProcessing/LensFlare.h
  • src/Features/PostProcessing/LocalExposure.cpp
  • src/Features/PostProcessing/LocalExposure.h
  • src/Features/PostProcessing/MotionBlur.cpp
  • src/Features/PostProcessing/MotionBlur.h
  • src/Features/PostProcessing/OpenDRT.cpp
  • src/Features/PostProcessing/OpenDRT.h
  • src/Features/PostProcessing/OpenDRTIo.h
  • src/Features/PostProcessing/PhysicalGlare.cpp
  • src/Features/PostProcessing/PhysicalGlare.h
  • src/Features/PostProcessing/PostProcessFeature.cpp
  • src/Features/PostProcessing/PostProcessFeature.h
  • src/Features/PostProcessing/PostProcessingUI.cpp
  • src/Features/PostProcessing/PostProcessingUI.h
  • src/Features/PostProcessing/Vignette.cpp
  • src/Features/PostProcessing/Vignette.h
  • src/Features/Upscaling.cpp
  • src/Globals.cpp
  • src/Globals.h
  • src/Menu/ThemeManager.cpp
  • src/Utils/D3D.cpp
  • src/Utils/UI.h

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Dlizzio Dlizzio changed the title feat(post-processing): port Jiaye's upstream beta pipeline feat: post processing Jul 27, 2026
Automated formatting by clang-format, prettier, and other hooks.
See https://pre-commit.ci for details.
@github-actions

Copy link
Copy Markdown

No actionable suggestions for changed features.

@Dlizzio Dlizzio added the source: upstream Synced/merged from community-shaders upstream label Jul 27, 2026
@Dlizzio Dlizzio closed this Jul 27, 2026
@Dlizzio Dlizzio reopened this Jul 27, 2026
@alandtse

Copy link
Copy Markdown
Owner

Dlizzio, please note Claude had the following comments after comparing both our attempts. See if any make sense.

  • Vignette (vignette.cs.hlsl): dropped the max(cos_view, 0.0) clamp before pow(). HLSL pow() with a negative base and non-integer exponent is undefined/NaN -- worth keeping the clamp for safety at fp edge cases.
  • DoF (dof.cs.hlsl, PerformNeighborTileGather): neighbor-tile offsets are computed via unsigned uint2 arithmetic without clamping to texture bounds. Near texture edges this can wrap instead of clamping to a valid coordinate -- worth reintroducing a bounds clamp.
  • LUT (lut.cs.hlsl): uint3 dims; is left uninitialized instead of = 0. Harmless today since dims.z isn't read outside the 3D-LUT branch, but worth initializing defensively.
  • MotionBlur (motionblur_blurpass.cs.hlsl / motionblur_neighborpass.cs.hlsl): minor nits -- g_SampleCount / 2 is recomputed every loop iteration instead of hoisted, and the explicit int(GRID_SIZE) cast before a signed comparison was dropped. Neither is a correctness issue, just worth a look.

@Dlizzio
Dlizzio marked this pull request as ready for review July 28, 2026 00:36
@Dlizzio

Dlizzio commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

Dlizzio, please note Claude had the following comments after comparing both our attempts. See if any make sense.

  • Vignette (vignette.cs.hlsl): dropped the max(cos_view, 0.0) clamp before pow(). HLSL pow() with a negative base and non-integer exponent is undefined/NaN -- worth keeping the clamp for safety at fp edge cases.
  • DoF (dof.cs.hlsl, PerformNeighborTileGather): neighbor-tile offsets are computed via unsigned uint2 arithmetic without clamping to texture bounds. Near texture edges this can wrap instead of clamping to a valid coordinate -- worth reintroducing a bounds clamp.
  • LUT (lut.cs.hlsl): uint3 dims; is left uninitialized instead of = 0. Harmless today since dims.z isn't read outside the 3D-LUT branch, but worth initializing defensively.
  • MotionBlur (motionblur_blurpass.cs.hlsl / motionblur_neighborpass.cs.hlsl): minor nits -- g_SampleCount / 2 is recomputed every loop iteration instead of hoisted, and the explicit int(GRID_SIZE) cast before a signed comparison was dropped. Neither is a correctness issue, just worth a look.

Looks like all these are currently already fixed

@alandtse

Copy link
Copy Markdown
Owner

Correction to my last comment: I had the MotionBlur samplePairCount point backwards. Your motionblur_blurpass.cs.hlsl already hoists int samplePairCount = g_SampleCount >> 1; outside the loop -- that's fine as-is. It's actually our branch that inlines g_SampleCount / 2 per iteration; that's on us to fix, not you. Apologies for the noise. The other three points (Vignette clamp, DoF bounds, LUT init) still stand as written.

@Dlizzio

Dlizzio commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator Author

Correction to my last comment: I had the MotionBlur samplePairCount point backwards. Your motionblur_blurpass.cs.hlsl already hoists int samplePairCount = g_SampleCount >> 1; outside the loop -- that's fine as-is. It's actually our branch that inlines g_SampleCount / 2 per iteration; that's on us to fix, not you. Apologies for the noise. The other three points (Vignette clamp, DoF bounds, LUT init) still stand as written.

I rechecked the current PR head (c837d4e), and the other three are already present as well: Vignette uses pow(max(cos_view, 0.0), ...), DoF uses signed int2 coordinates clamped to the texture bounds, and LUT initializes uint3 dims = 0. These were included in 83b189d.

@github-actions

Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

@alandtse
alandtse merged commit 74d1c52 into alandtse:dev Jul 28, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source: upstream Synced/merged from community-shaders upstream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants