# How to port vMapUv to TSL?

**URL:** <https://discourse.threejs.org/t/how-to-port-vmapuv-to-tsl/88730>\
**Category:** Questions\
**Tags:** tsl, shaders\
**Created:** [December 18, 2025, 9:17pm UTC](https://discourse.threejs.org/t/how-to-port-vmapuv-to-tsl/88730 "2025-12-18T21:17:32Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![PavelBoytchev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/pavelboytchev/32/38639_2.png) [@PavelBoytchev](https://discourse.threejs.org/u/PavelBoytchev)\
**Post date:** [December 26, 2025, 8:51am UTC](https://discourse.threejs.org/t/how-to-port-vmapuv-to-tsl/88730/8 "2025-12-26T08:51:24Z")

</div>

> [@trusktr](#):
>
> How do I read the equivalent of vMapUv

It is `uv()`, as you already use it. Maybe there is some bug, some, some interference with the rest of the code or an incorrect intermediate value?

When I test uv() with Discard it works as intended:

[https://codepen.io/boytchev/pen/xbObOBj?editors=0010](https://codepen.io/boytchev/pen/xbObOBj?editors=0010)

[![image](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/d/b/dbf7c184667ad794207525fac7771e8cd50ef91c.png)](https://codepen.io/boytchev/pen/xbObOBj?editors=0010)

It might be easier to debug the function if you convert it to color and use as color node, not opacity node. In this way you can inspect whether `edgePos`, `pixelWidth`, `fade`, `alphaFactor` and `newOpacity` all have correct values.

---

_[View the full topic](https://discourse.threejs.org/t/how-to-port-vmapuv-to-tsl/88730)._
