# \#glsl

**URL:** https://forum.babylonjs.com/tag/glsl/343.md

[Latest](https://forum.babylonjs.com/latest.md) · [Categories](https://forum.babylonjs.com/categories.md) · [Tags](https://forum.babylonjs.com/tags.md)

---

## [Adding a non semantic keyword in GLSL](https://forum.babylonjs.com/t/adding-a-non-semantic-keyword-in-glsl/62445)

<div class="topic-metadata">

**Author:** [@spencer-lunarg](https://forum.babylonjs.com/u/spencer-lunarg)\
**Replies:** 6\
**Last updated:** [February 17, 2026, 3:39am UTC](https://forum.babylonjs.com/t/adding-a-non-semantic-keyword-in-glsl/62445 "2026-02-17T03:39:52Z")

</div>

Hello, I work for LunarG and helping maintain GLSL/glslang I am aware babylon.js has to likely generate GLSL in order to target WebGL If this is true, is there any use/desire in adding a \[\[non\_semantic("some info")\]\] k…

---

## [ASCII shader using GLSL PostProcessing](https://forum.babylonjs.com/t/ascii-shader-using-glsl-postprocessing/56666)

<div class="topic-metadata">

**Author:** [@Tricotou](https://forum.babylonjs.com/u/Tricotou)\
**Replies:** 8\
**Last updated:** [February 26, 2025, 4:59pm UTC](https://forum.babylonjs.com/t/ascii-shader-using-glsl-postprocessing/56666 "2025-02-26T16:59:44Z")

</div>

Hello guys :slight\_smile: Just having fun with GLSL : This shader is basically using this ASCII texture : Computing pixelated B&W blocks Computing matching UVs Brightness along X Random variation along Y Have…

---

## [How to set the value of a common uniform to several ShaderMaterials in one step?](https://forum.babylonjs.com/t/how-to-set-the-value-of-a-common-uniform-to-several-shadermaterials-in-one-step/54624)

<div class="topic-metadata">

**Author:** [@Khanon](https://forum.babylonjs.com/u/Khanon)\
**Replies:** 6\
**Last updated:** [November 8, 2024, 5:01pm UTC](https://forum.babylonjs.com/t/how-to-set-the-value-of-a-common-uniform-to-several-shadermaterials-in-one-step/54624 "2024-11-08T17:01:42Z")

</div>

Hello, Coming from here: Proper way to animate a texture attached to a mesh? I’m treating to do the whole “play animation” logic of a pseudo-sprite within the shader code (switching texture coordinates of a plane), to …

---

## [Seams / Artifacts between texture tiles when using Mipmaps](https://forum.babylonjs.com/t/seams-artifacts-between-texture-tiles-when-using-mipmaps/54269)

<div class="topic-metadata">

**Author:** [@Byloth](https://forum.babylonjs.com/u/Byloth)\
**Replies:** 9\
**Last updated:** [November 6, 2024, 10:12pm UTC](https://forum.babylonjs.com/t/seams-artifacts-between-texture-tiles-when-using-mipmaps/54269 "2024-11-06T22:12:23Z")

</div>

Hello. I’m using a SpriteMap Tile Layout to display the plane of a boardgame I’m developing. Now… I’m using BABYLON.Texture.NEAREST\_NEAREST as sampling mode to avoid problems. If I were use BABYLON.Texture.LINEAR\_LIN…

---

## [Location of variable glFragColor conflicts with another variable](https://forum.babylonjs.com/t/location-of-variable-glfragcolor-conflicts-with-another-variable/53745)

<div class="topic-metadata">

**Author:** [@Vortex](https://forum.babylonjs.com/u/Vortex)\
**Replies:** 5\
**Last updated:** [September 25, 2024, 9:28pm UTC](https://forum.babylonjs.com/t/location-of-variable-glfragcolor-conflicts-with-another-variable/53745 "2024-09-25T21:28:14Z")

</div>

When launching my game on my laptop, I get errors, and the GLSL shaders do not work. However, it works fine on my desktop PC. Both devices are running Fedora 40. I’ve verified this isn’t a problem with any code- I copie…

---

## [Issue Converting ShaderToy Shader to Babylon.js Shader - Different Visual Effect](https://forum.babylonjs.com/t/issue-converting-shadertoy-shader-to-babylon-js-shader-different-visual-effect/53090)

<div class="topic-metadata">

**Author:** [@rk\_gnanesh](https://forum.babylonjs.com/u/rk_gnanesh)\
**Replies:** 5\
**Last updated:** [August 30, 2024, 11:02am UTC](https://forum.babylonjs.com/t/issue-converting-shadertoy-shader-to-babylon-js-shader-different-visual-effect/53090 "2024-08-30T11:02:46Z")

</div>

Hello everyone, I’ve been working on converting a shader from ShaderToy to Babylon.js, but I’m running into an issue where the visual effect produced by the shader in Babylon.js is noticeably different from what I see i…

---

## [WebGPU error add sampler uniform custom Shader Material using GLSL](https://forum.babylonjs.com/t/webgpu-error-add-sampler-uniform-custom-shader-material-using-glsl/49379)

<div class="topic-metadata">

**Author:** [@JoseAlcaraz](https://forum.babylonjs.com/u/JoseAlcaraz)\
**Replies:** 2\
**Last updated:** [April 5, 2024, 4:33pm UTC](https://forum.babylonjs.com/t/webgpu-error-add-sampler-uniform-custom-shader-material-using-glsl/49379 "2024-04-05T16:33:23Z")

</div>

Hello BJS world. I’m getting an error when trying to define a sampler2D variable texture1 inside a fragment shader. It seems to work with WebGL, but when I switch to WebGPU I get the error and nothing renders. PG here. …

---

## [Uniform arrays with non uniform control texture sample (WebGPU)](https://forum.babylonjs.com/t/uniform-arrays-with-non-uniform-control-texture-sample-webgpu/46252)

<div class="topic-metadata">

**Author:** [@CrashMaster](https://forum.babylonjs.com/u/CrashMaster)\
**Replies:** 21\
**Last updated:** [December 14, 2023, 3:00pm UTC](https://forum.babylonjs.com/t/uniform-arrays-with-non-uniform-control-texture-sample-webgpu/46252 "2023-12-14T15:00:25Z")

</div>

Hello everyone! This is a followup question to Texture sampler and non uniform control flow TLDR: uniform control flow analysis can be disabled in BabylonJS by adding /\* disable\_uniformity\_analysis \*/ in the shader cod…

---

## [CYOS zip download stores shaders in ShadersStoreWGSL, even with WebGL](https://forum.babylonjs.com/t/cyos-zip-download-stores-shaders-in-shadersstorewgsl-even-with-webgl/45962)

<div class="topic-metadata">

**Author:** [@cx20](https://forum.babylonjs.com/u/cx20)\
**Replies:** 7\
**Last updated:** [November 29, 2023, 1:48pm UTC](https://forum.babylonjs.com/t/cyos-zip-download-stores-shaders-in-shadersstorewgsl-even-with-webgl/45962 "2023-11-29T13:48:55Z")

</div>

I tried zip download using CYOS. https://cyos.babylonjs.com/ Strangely enough, even if WebGL1/2 is selected as the 3D API, shaders seem to be stored in ShadersStoreWGSL. I suggest revising the logic to ensure tha…

---

## [Texel fetch not working](https://forum.babylonjs.com/t/texel-fetch-not-working/45191)

<div class="topic-metadata">

**Author:** [@arcman7](https://forum.babylonjs.com/u/arcman7)\
**Replies:** 3\
**Last updated:** [October 26, 2023, 4:56pm UTC](https://forum.babylonjs.com/t/texel-fetch-not-working/45191 "2023-10-26T16:56:48Z")

</div>

My issue is that Texel fetch is not working, and neither is reading from 2d texture arrays. I’m using the webGPU engine, but the particular shader I’m working in is GLSL. I’ve been creating the texture with these setting…

---

## [The shader written in GLSL is being painted in yellow instead of displaying a gradient color?](https://forum.babylonjs.com/t/the-shader-written-in-glsl-is-being-painted-in-yellow-instead-of-displaying-a-gradient-color/43024)

<div class="topic-metadata">

**Author:** [@SNM](https://forum.babylonjs.com/u/SNM)\
**Replies:** 4\
**Last updated:** [August 7, 2023, 3:27pm UTC](https://forum.babylonjs.com/t/the-shader-written-in-glsl-is-being-painted-in-yellow-instead-of-displaying-a-gradient-color/43024 "2023-08-07T15:27:42Z")

</div>

The shader is displaying a solid yellow color instead of gradient color for some unknown reason. I even tried the shader in the Babylon Cyos editor (https://cyos.babylonjs.com/), and it still showed the yellow color. Is …

---

## [The fragment shader material doesn't stay with the object when we drag it around?](https://forum.babylonjs.com/t/the-fragment-shader-material-doesnt-stay-with-the-object-when-we-drag-it-around/43041)

<div class="topic-metadata">

**Author:** [@SNM](https://forum.babylonjs.com/u/SNM)\
**Replies:** 2\
**Last updated:** [August 7, 2023, 3:17pm UTC](https://forum.babylonjs.com/t/the-fragment-shader-material-doesnt-stay-with-the-object-when-we-drag-it-around/43041 "2023-08-07T15:17:19Z")

</div>

How can I make the fragment shader material move with the ground/mesh when it is dragged around? Is it because the custom vector shader is configured for world view projection? Or do I need to set this explicitly usin…

---

## [Babylon Native custom shader texture sampler inverted in iOS?](https://forum.babylonjs.com/t/babylon-native-custom-shader-texture-sampler-inverted-in-ios/42776)

<div class="topic-metadata">

**Author:** [@inteja](https://forum.babylonjs.com/u/inteja)\
**Replies:** 5\
**Last updated:** [August 3, 2023, 10:03am UTC](https://forum.babylonjs.com/t/babylon-native-custom-shader-texture-sampler-inverted-in-ios/42776 "2023-08-03T10:03:03Z")

</div>

In our Babylon React Native app I have a shader in a custom material plugin that uses a texture sampler to lookup vertex color, but the vertical texture coordinate seems to get inverted when the app is built for iOS comp…

---

## [Custom shaders in RTT and Post Process](https://forum.babylonjs.com/t/custom-shaders-in-rtt-and-post-process/41603)

<div class="topic-metadata">

**Author:** [@gfxnoob](https://forum.babylonjs.com/u/gfxnoob)\
**Replies:** 1\
**Last updated:** [June 14, 2023, 11:40am UTC](https://forum.babylonjs.com/t/custom-shaders-in-rtt-and-post-process/41603 "2023-06-14T11:40:54Z")

</div>

I have a scene with just one object for which I want to achieve special effects. I need to render the scene to texture (RTT) with with custom shaders(for special effects). Only the Diffuse component (Store as texture …

---

## [Convert GLSL to WGSL](https://forum.babylonjs.com/t/convert-glsl-to-wgsl/40786)

<div class="topic-metadata">

**Author:** [@arcman7](https://forum.babylonjs.com/u/arcman7)\
**Replies:** 3\
**Last updated:** [May 14, 2023, 10:43pm UTC](https://forum.babylonjs.com/t/convert-glsl-to-wgsl/40786 "2023-05-14T22:43:06Z")

</div>

I know that babylon.js can convert glsl shader code on the fly to wgsl, I was wondering is it possible to setup a playground that simply outputs the converted code? This would be a useful tool and I’m not having much loo…
