# How to Create a Bidirectional Wiper Effect in Unreal Engine Using Only Math in Materials?

**URL:** <https://forums.unrealengine.com/t/how-to-create-a-bidirectional-wiper-effect-in-unreal-engine-using-only-math-in-materials/2472474>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, Post-Process\
**Created:** [April 23, 2025, 6:16pm UTC](https://forums.unrealengine.com/t/how-to-create-a-bidirectional-wiper-effect-in-unreal-engine-using-only-math-in-materials/2472474 "2025-04-23T18:16:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vemilab](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@vemilab](https://forums.unrealengine.com/u/vemilab)\
**Post date:** [April 23, 2025, 6:16pm UTC](https://forums.unrealengine.com/t/how-to-create-a-bidirectional-wiper-effect-in-unreal-engine-using-only-math-in-materials/2472474/1 "2025-04-23T18:16:25Z")

</div>

Hey everyone,  
I’m working on a **wiper effect** in Unreal Engine for a rain-covered lens or windshield. I already have a **rain function** that works perfectly inside the material, and now I’m trying to simulate a wiper that clears the rain as it moves across the screen.

The twist is:  
I’m doing this **entirely using math functions** in the material — no texture masks or blueprints.

Here’s the issue I’m facing:

- On the first pass (e.g., left to right), the wiper clears the rain nicely.
- But on the return pass (right to left), **the rain reappears immediately behind the wiper** , as if the wipe never happened.
- It’s like the material re-renders the rain every frame without remembering that the area was cleared.

What I’m trying to achieve is a **bidirectional wipe** , just like a real car wiper — where the rain is cleared in both directions and stays cleared until new rain appears.

**How I’m doing it now:**

- I’m using math operations (like `abs`, `step`, `sine`, etc.) to define a “wiper zone” that moves over time.
- I’m blending this zone with the rain output to simulate wiping.
- But since everything is recomputed each frame, the wipe isn’t persistent.

My question:  
What is the best way to implement this purely using materials? I’ve tried everything I know.

Any advice, logical suggestions, or examples would be really helpful!

Thanks in advance!

 ![wiper](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/5/2/1521a400108c3f7786baa42570878a7a2c24f705.png)

---

<div class="post-metadata">

**Author:** ![ThirdEyeAgent](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ThirdEyeAgent](https://forums.unrealengine.com/u/ThirdEyeAgent)\
**Post date:** [January 10, 2026, 1:56am UTC](https://forums.unrealengine.com/t/how-to-create-a-bidirectional-wiper-effect-in-unreal-engine-using-only-math-in-materials/2472474/2 "2026-01-10T01:56:24Z")

</div>

are you still facing this issue ? or have you fixed it
