# Change opacity using fat lines example

**URL:** <https://discourse.threejs.org/t/change-opacity-using-fat-lines-example/5523>\
**Category:** Questions\
**Tags:** materials\
**Created:** [December 28, 2018, 6:00pm UTC](https://discourse.threejs.org/t/change-opacity-using-fat-lines-example/5523 "2018-12-28T18:00:30Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Joachim](https://avatars.discourse-cdn.com/v4/letter/j/a87d85/32.png) [@Joachim](https://discourse.threejs.org/u/Joachim)\
**Post date:** [March 20, 2020, 1:29pm UTC](https://discourse.threejs.org/t/change-opacity-using-fat-lines-example/5523/7 "2020-03-20T13:29:39Z")

</div>

LineMaterial is a ShaderMaterial which has a uniform opacity that is passed to the fragment shader. However when setting opacity on the LineMaterial it is not passed to the fragment shader. A workaround is to set the opacity uniform directly. So instead of setting material.opacity = 0.5, I did material.uniforms.opacity = 0.5. Hope this works for others aswell.

---

_[View the full topic](https://discourse.threejs.org/t/change-opacity-using-fat-lines-example/5523)._
