04-21-2026, 10:29 AM
(This post was last modified: 04-23-2026, 03:55 AM by OLK0001.
Edit Reason: fix broken image
)
Update on the bodyline clipping censor shader
I managed to get the shader much closer to what I wanted. The current version is a lightweight single-pass bodyline clipping shader. It samples the current screen, detects exposed skin/body-like pixels, and lets the censor show only through those areas.
The shader is still not perfect, but the current version is a big improvement over my earlier attempts.
Pros / what works well now:
Known flaws / current limitations:
Important note about the layer glitch:
The shader has two possible output styles.
Restore-layer mode:
This matches my original v2/v3.4 pipeline, but it can ghost if CurrentScreenTexture is delayed.
Direct censor mode:
This should remove the ghosting because it no longer redraws the captured screen texture. But it requires a different setup: the shader has to be placed directly on the censor node, and the sampled CurrentScreenTexture must be a clean pre-censor same-frame texture.
The shader is now fast and usable, and it handles clothing/background much better than before. The remaining problems are mostly edge cases: bright scenes, red clothing, colored lighting, and the screen-texture timing issue. The biggest remaining technical problem is the layer ghosting, which likely needs a pipeline/render-order fix rather than more skin-detection math. This is my absolute best attempt, to balance out skin vs background blending. It can only be better if hotscreen itself improves.
![[Image: tNPnKdg.png]](https://i.imgur.com/tNPnKdg.png)
Custom Body Line Clipping3.4L.zip (Size: 14.32 KB / Downloads: 144)
I managed to get the shader much closer to what I wanted. The current version is a lightweight single-pass bodyline clipping shader. It samples the current screen, detects exposed skin/body-like pixels, and lets the censor show only through those areas.
The shader is still not perfect, but the current version is a big improvement over my earlier attempts.
Pros / what works well now:
- Much faster than my older v3.1/v3.4 attempts. The current version only uses center + 4-neighbor sampling instead of a heavier 8-neighbor/bridge setup.
- The skin scoring is shared in one function, so it avoids recalculating a lot of color logic multiple times.
- Clothing clipping is much better now. Black clothing, dark straps, wings, hair, and accessories are less likely to be swallowed by the censor.
- Background clipping is also much better. It no longer blindly censors large chunks of the background like my first version did.
- It has a saturated red/pink detail detector, so it can catch exposed areas that normal skin-color detection misses.
- It also has a red-cloth rejection pass to reduce false positives on red skirts, red fabric, and saturated clothing.
- The shader has debug views for checking body score, hot/saturated score, neutral/background rejection, and red-cloth rejection.
- It does not need machine learning, CPU image processing, or a separate segmentation mask. It is just a canvas_item shader.
Known flaws / current limitations:
- Bright scenes are still the hardest case. Pale skin, white clothing, beige walls, bloom, and overexposed lighting can become very similar in color space. In those cases the censor can still come out looking square.
- Character lighting affects detection a lot. Strong blue, red, purple, or green lighting can push skin outside the expected color range, so the shader can either miss skin or censor too much.
- Red clothing is still difficult. The shader has a red-cloth rejector, but red/pink exposed detail and red fabric are very close in color. Tuning this is a tradeoff: stricter red rejection protects skirts/clothes, but can miss saturated exposed detail.
- The shader is color-based, not true body segmentation. It does not understand anatomy or body shape. It only guesses from color, brightness, saturation, YCbCr-like values, and local neighbor support.
- If the censor rectangle is too small and its edge crosses the body, the shader can still reveal the rectangle edge. The censor area needs to be larger than the body part, then the shader hides the excess.
- There is still a possible “floating layer” or ghosting issue in restore-layer mode. This is not really a skin-detection flaw. It happens because the shader copies CurrentScreenTexture back onto the screen for non-skin pixels. If that texture is one frame delayed, it draws an old copy of the character over the current frame.
Important note about the layer glitch:
The shader has two possible output styles.
Restore-layer mode:
- skin = transparent, censor below shows
- non-skin = copied screen texture
This matches my original v2/v3.4 pipeline, but it can ghost if CurrentScreenTexture is delayed.
Direct censor mode:
- skin = draw censor
- non-skin = transparent
This should remove the ghosting because it no longer redraws the captured screen texture. But it requires a different setup: the shader has to be placed directly on the censor node, and the sampled CurrentScreenTexture must be a clean pre-censor same-frame texture.
The shader is now fast and usable, and it handles clothing/background much better than before. The remaining problems are mostly edge cases: bright scenes, red clothing, colored lighting, and the screen-texture timing issue. The biggest remaining technical problem is the layer ghosting, which likely needs a pipeline/render-order fix rather than more skin-detection math. This is my absolute best attempt, to balance out skin vs background blending. It can only be better if hotscreen itself improves.
![[Image: tNPnKdg.png]](https://i.imgur.com/tNPnKdg.png)
Custom Body Line Clipping3.4L.zip (Size: 14.32 KB / Downloads: 144)

