Skip to content

Conversation

@MopanionStudios
Copy link

Addresses #857

You can close this pull request if you like, as I understand I am not assigned to the issue, but I implemented a lightweight method using Xstarsia's plan to use dFdx/dFdy space for scaling the AO and normals intensity depending on their distance to the camera.

I allow for the effect's intensity to be adjusted by a shader parameter, and clamp it to 1.0 at minimum so that it doesn't go below the normal depth / ao original values. It adds a subtle but noticeable difference that improves the visuals, as seen here:

Screenshot 2025-11-19 230509 Screenshot 2025-11-19 230729

@TokisanGames TokisanGames requested a review from Xtarsia November 20, 2025 11:45
@MopanionStudios
Copy link
Author

Just updated/fixed the distance scaling, before it was utilizing UV space which goes from 0-1 in regions. To make the scaling more reliable, it now uses v_vertex, I also changed the name of the uniform float controlling the effect to make its purpose more clear. Heres an updated example of what the effect does:

2025-11-22.12-26-25.mp4

@MopanionStudios MopanionStudios marked this pull request as ready for review November 22, 2025 20:27
@TokisanGames TokisanGames marked this pull request as draft November 23, 2025 03:15
@MopanionStudios MopanionStudios marked this pull request as ready for review November 24, 2025 00:54
@TokisanGames TokisanGames added this to the 1.1 milestone Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants