# ZOffset explanation

**URL:** <https://forum.babylonjs.com/t/zoffset-explanation/23050>\
**Category:** Questions\
**Created:** [August 13, 2021, 9:28am UTC](https://forum.babylonjs.com/t/zoffset-explanation/23050 "2021-08-13T09:28:38Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Urpgor](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/urpgor/32/17886_2.png) [@Urpgor](https://forum.babylonjs.com/u/Urpgor)\
**Post date:** [August 17, 2021, 10:11am UTC](https://forum.babylonjs.com/t/zoffset-explanation/23050/7 "2021-08-17T10:11:58Z")

</div>

Since I need to control exactly how large the offset is to fit the logic of my custom shader I solved it now another way: [Per mesh projection matrix](https://forum.babylonjs.com/t/per-mesh-projection-matrix/23105)

The problem with the polygonOffset() would be that I would need to know the value of “r” which is described in the docs as `r is the smallest value that is guaranteed to produce a resolvable offset for a given implementation.` Might be that one can somehow query it but like I said, I solved it by modifying the projection matrix.

---

_[View the full topic](https://forum.babylonjs.com/t/zoffset-explanation/23050)._
