# TSL and webgl2 vs webgpu

**URL:** <https://discourse.threejs.org/t/tsl-and-webgl2-vs-webgpu/87974>\
**Category:** Questions\
**Created:** [November 6, 2025, 9:37pm UTC](https://discourse.threejs.org/t/tsl-and-webgl2-vs-webgpu/87974 "2025-11-06T21:37:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattias\_98](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mattias_98/32/37470_2.png) [@mattias\_98](https://discourse.threejs.org/u/mattias_98)\
**Post date:** [November 6, 2025, 9:37pm UTC](https://discourse.threejs.org/t/tsl-and-webgl2-vs-webgpu/87974/1 "2025-11-06T21:37:28Z")

</div>

Hiya all, finally it’s been my turn to play around and learn TSL, and I’ve been very excited for this.

Playing around with webgpu, I wanted to ensure I had a webgl fallback, for browsers that didn’t support webgpu, although the webglrenderer, wouldnt take any nodes I fed it. I’ve been looking around this discourse and found a few different posts, initially, I couldn’t understand how TSL was renderer agnostic. Supposedly, the webgpu-renderer uses webgl2 as a fallback, whenever the browser doesn’t support webgpu → TSL compiles to glsl + wgsl, so its agnostic. Gotcha, got it, that makes sense.

But just to be absolutely sure, does that essentially mean, there’s any gotcha’s to be aware of using the webgpu renderer, will anything work on webgpu and webgl2 the same, despite shaders as well?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [November 7, 2025, 9:52am UTC](https://discourse.threejs.org/t/tsl-and-webgl2-vs-webgpu/87974/2 "2025-11-07T09:52:05Z")

</div>

> [@mattias\_98](#):
>
> But just to be absolutely sure, does that essentially mean, there’s any gotcha’s to be aware of using the webgpu renderer, will anything work on webgpu and webgl2 the same, despite shaders as well?

Compute shaders are not fully compatible with WebGL 2. Depending on what features you are using (e.g. indirect draw calls via `IndirectStorageBufferAttribute` or atomics), the code will only work with WebGPU. It is also not possible to emulate this code somehow with GLSL/WebGL 2 so make sure you pick the correct feature set if you want to ensure WebGL 2 support as well.

To get an overview, it’s maybe best to go through the compute examples ( [three.js examples](https://threejs.org/examples/?q=compute) ) with a WebGL 2 only browser like Firefox to see which one work with WebGL as well.

---

<div class="post-metadata">

**Author:** ![gobinda-das-dev](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/gobinda-das-dev/32/66574_2.png) [@gobinda-das-dev](https://discourse.threejs.org/u/gobinda-das-dev)\
**Post date:** [August 16, 2026, 6:32am UTC](https://discourse.threejs.org/t/tsl-and-webgl2-vs-webgpu/87974/3 "2026-08-16T06:32:42Z")

</div>

please help me 🙏

> [@Learning Compute shaders in tsl](https://discourse.threejs.org/t/learning-compute-shaders-in-tsl/90013):
>
> From where can I know more about compute shaders in tsl. and one more thing, when i do compute shaders in tsl with webgpuRenderer, will it work inside webgl?
