# Mesh points to the camera on only 2 axis with shaders

**URL:** https://discourse.threejs.org/t/mesh-points-to-the-camera-on-only-2-axis-with-shaders/21555
**Category:** Questions
**Tags:** sprites, math, shaders, threejs
**Created:** [December 13, 2020, 10:46am UTC](https://discourse.threejs.org/t/mesh-points-to-the-camera-on-only-2-axis-with-shaders/21555 "2020-12-13T10:46:12Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)
#### Post date: [February 16, 2021, 10:08am UTC](https://discourse.threejs.org/t/mesh-points-to-the-camera-on-only-2-axis-with-shaders/21555/7 "2021-02-16T10:08:34Z")

</div>

Just recalled about this topic, surfing @hofk’s collection of examples.  
Seems it works with `InstancedMesh` and slightly modified `MeshBasicMaterial` ([modification](https://discourse.threejs.org/t/instanced-geometry-vertex-shader-question/2694/3)), in which you pass a quaternion in uniform: [https://jsfiddle.net/prisoner849/g8j24z0n/](https://jsfiddle.net/prisoner849/g8j24z0n/)

---

_[View the full topic](https://discourse.threejs.org/t/mesh-points-to-the-camera-on-only-2-axis-with-shaders/21555)._
