# \#shader

**URL:** https://forum.babylonjs.com/tag/shader/11.md?page=1

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

**Page:** 2

---

## [Vertex animation texture with material plugin](https://forum.babylonjs.com/t/vertex-animation-texture-with-material-plugin/57031)

<div class="topic-metadata">

**Author:** [@morteza\_norabadi](https://forum.babylonjs.com/u/morteza_norabadi)\
**Replies:** 5\
**Last updated:** [March 11, 2025, 12:14pm UTC](https://forum.babylonjs.com/t/vertex-animation-texture-with-material-plugin/57031 "2025-03-11T12:14:07Z")

</div>

hello there i’m currently working on custom vertex animation texture the process is like this import animated 3d models into bledner run custom python script that export glb file and bake animation on png file import…

---

## [GPU Meshed Voxel Data Questions](https://forum.babylonjs.com/t/gpu-meshed-voxel-data-questions/57009)

<div class="topic-metadata">

**Author:** [@DaltonJaxon](https://forum.babylonjs.com/u/DaltonJaxon)\
**Replies:** 1\
**Last updated:** [March 10, 2025, 9:09am UTC](https://forum.babylonjs.com/t/gpu-meshed-voxel-data-questions/57009 "2025-03-10T09:09:53Z")

</div>

Meshed Voxel Terrain | Babylon.js Playground In the example above, I’m working with Meshed Voxel Data, where each normal is represented by a distinct color. I haven’t encountered too many issues reaching this stage, but…

---

## [NME: reflections on modified in vertex shader plane are strange with PerturbNormal block](https://forum.babylonjs.com/t/nme-reflections-on-modified-in-vertex-shader-plane-are-strange-with-perturbnormal-block/56791)

<div class="topic-metadata">

**Author:** [@tokareuv](https://forum.babylonjs.com/u/tokareuv)\
**Replies:** 5\
**Last updated:** [February 27, 2025, 11:44am UTC](https://forum.babylonjs.com/t/nme-reflections-on-modified-in-vertex-shader-plane-are-strange-with-perturbnormal-block/56791 "2025-02-27T11:44:38Z")

</div>

I am using Node Material Editor to displace y-coordinate of plane at vertex shader and want to change normal orientation with PerturbNormal block accordingly with analytically calculated normal. I’ve made simple version…

---

## [How to apply material plugins to DepthRenderer](https://forum.babylonjs.com/t/how-to-apply-material-plugins-to-depthrenderer/55633)

<div class="topic-metadata">

**Author:** [@kzhsw](https://forum.babylonjs.com/u/kzhsw)\
**Replies:** 9\
**Last updated:** [January 22, 2025, 1:10pm UTC](https://forum.babylonjs.com/t/how-to-apply-material-plugins-to-depthrenderer/55633 "2025-01-22T13:10:28Z")

</div>

Version: 7.42.0 Engine: WebGL2 Browser: Chrome Desc: I’m trying to implement the WEBGL\_multi\_draw extension in babylon.js. Similar to BatchedMesh of three.js, a custom vertex shader (and a few samplers) needs to be a…

---

## [May I ask what approach I need to use to achieve the desired effect?](https://forum.babylonjs.com/t/may-i-ask-what-approach-i-need-to-use-to-achieve-the-desired-effect/56029)

<div class="topic-metadata">

**Author:** [@zertaul](https://forum.babylonjs.com/u/zertaul)\
**Replies:** 6\
**Last updated:** [January 21, 2025, 7:55pm UTC](https://forum.babylonjs.com/t/may-i-ask-what-approach-i-need-to-use-to-achieve-the-desired-effect/56029 "2025-01-21T19:55:38Z")

</div>

How can I achieve the effect shown in the above picture? I have seen in the official documentation that the closest method to capturing a screen is through RenderTarget Texture. However, the examples provided on the o…

---

## [Can glBlendedFunc be used in the custom shader of babylonjs](https://forum.babylonjs.com/t/can-glblendedfunc-be-used-in-the-custom-shader-of-babylonjs/56006)

<div class="topic-metadata">

**Author:** [@Bin\_Mo](https://forum.babylonjs.com/u/Bin_Mo)\
**Replies:** 1\
**Last updated:** [January 16, 2025, 11:37am UTC](https://forum.babylonjs.com/t/can-glblendedfunc-be-used-in-the-custom-shader-of-babylonjs/56006 "2025-01-16T11:37:58Z")

</div>

BABYLON.Effect.ShadersStore\[“customVertexShader”\] = \` precision highp float; attribute vec3 position; uniform mat4 worldViewProjection; void main() { gl\_Position = worldViewProjection \* vec4(position, 1.0); } \`; B…

---

## [Using RenderTargetTexture with EffectWrapper / EffectRenderer](https://forum.babylonjs.com/t/using-rendertargettexture-with-effectwrapper-effectrenderer/55067)

<div class="topic-metadata">

**Author:** [@gems](https://forum.babylonjs.com/u/gems)\
**Replies:** 7\
**Last updated:** [January 8, 2025, 6:19pm UTC](https://forum.babylonjs.com/t/using-rendertargettexture-with-effectwrapper-effectrenderer/55067 "2025-01-08T18:19:48Z")

</div>

Hello, I’m trying to find my way to doing a multipass shader on the entire canvas without totally straying from how I’ve done it with a ShaderMaterial. For this I have multiple RenderTargetTexture, and before render I s…

---

## [Can the height, width, and depth of the current mesh be obtained in the shader](https://forum.babylonjs.com/t/can-the-height-width-and-depth-of-the-current-mesh-be-obtained-in-the-shader/55817)

<div class="topic-metadata">

**Author:** [@Kelede](https://forum.babylonjs.com/u/Kelede)\
**Replies:** 2\
**Last updated:** [January 8, 2025, 5:05am UTC](https://forum.babylonjs.com/t/can-the-height-width-and-depth-of-the-current-mesh-be-obtained-in-the-shader/55817 "2025-01-08T05:05:24Z")

</div>

I created a terrain using a height map and then wrote a shader to color it according to different heights. I need to input a set of colors, each containing RGB color values and percentage height values. I need to obtain …

---

## [How to calculate Tangent in shader?](https://forum.babylonjs.com/t/how-to-calculate-tangent-in-shader/55555)

<div class="topic-metadata">

**Author:** [@Bin\_Mo](https://forum.babylonjs.com/u/Bin_Mo)\
**Replies:** 4\
**Last updated:** [December 26, 2024, 10:26am UTC](https://forum.babylonjs.com/t/how-to-calculate-tangent-in-shader/55555 "2024-12-26T10:26:08Z")

</div>

Is this method feasible? attribute vec3 tangent;

---

## [Issue importing shader during GLTF Export](https://forum.babylonjs.com/t/issue-importing-shader-during-gltf-export/55465)

<div class="topic-metadata">

**Author:** [@Forsaken](https://forum.babylonjs.com/u/Forsaken)\
**Replies:** 3\
**Last updated:** [December 20, 2024, 8:19am UTC](https://forum.babylonjs.com/t/issue-importing-shader-during-gltf-export/55465 "2024-12-20T08:19:44Z")

</div>

Hello everyone, This seemingly random issue started popping up for me recently. Whenever I ran the following code (or any GLTF2Export function): GLTF2Export.GLBAsync(scene, filename, {}).then((gltf) =\> { …

---

## [May I ask if there is a faster way for ShaderMaterial to obtain the corresponding data during the data exchange process?](https://forum.babylonjs.com/t/may-i-ask-if-there-is-a-faster-way-for-shadermaterial-to-obtain-the-corresponding-data-during-the-data-exchange-process/55165)

<div class="topic-metadata">

**Author:** [@zertaul](https://forum.babylonjs.com/u/zertaul)\
**Replies:** 2\
**Last updated:** [December 17, 2024, 1:00am UTC](https://forum.babylonjs.com/t/may-i-ask-if-there-is-a-faster-way-for-shadermaterial-to-obtain-the-corresponding-data-during-the-data-exchange-process/55165 "2024-12-17T01:00:16Z")

</div>

As shown in the question, when I use shaderMaterial to create custom materials, if I need to store data, I can find specialized data storage methods such as setfloat, setVector3, etc. in the API. However, obtaining the c…

---

## [How to require GLSL extension for material](https://forum.babylonjs.com/t/how-to-require-glsl-extension-for-material/55227)

<div class="topic-metadata">

**Author:** [@kzhsw](https://forum.babylonjs.com/u/kzhsw)\
**Replies:** 8\
**Last updated:** [December 11, 2024, 10:32am UTC](https://forum.babylonjs.com/t/how-to-require-glsl-extension-for-material/55227 "2024-12-11T10:32:27Z")

</div>

Version: 7.38.0 Engine: WebGL2 Browser: Chrome Background: I’m trying to implement the WEBGL\_multi\_draw extension in babylon.js, see previous context here: Per spec, #extension GL\_ANGLE\_multi\_draw needs to be added…

---

## [Skew 2D Sampler](https://forum.babylonjs.com/t/skew-2d-sampler/55271)

<div class="topic-metadata">

**Author:** [@Butterwell](https://forum.babylonjs.com/u/Butterwell)\
**Replies:** 0\
**Last updated:** [December 9, 2024, 1:48pm UTC](https://forum.babylonjs.com/t/skew-2d-sampler/55271 "2024-12-09T13:48:53Z")

</div>

Skewing on the xy plane at matrix indexes 1 and 4 below. \[ 1, yx, zx, 0, xy, 1, zy, 0, xz, yz, 1, 0, 0, 0, 0, 1 \] https://playground.babylonjs.com/#LG76I2

---

## [Can shared indexed vertices display different colors in different triangles that they're a part of?](https://forum.babylonjs.com/t/can-shared-indexed-vertices-display-different-colors-in-different-triangles-that-theyre-a-part-of/55191)

<div class="topic-metadata">

**Author:** [@Heaust-ops](https://forum.babylonjs.com/u/Heaust-ops)\
**Replies:** 5\
**Last updated:** [December 5, 2024, 5:47pm UTC](https://forum.babylonjs.com/t/can-shared-indexed-vertices-display-different-colors-in-different-triangles-that-theyre-a-part-of/55191 "2024-12-05T17:47:26Z")

</div>

PG: I want both triangles in this PG to have R, G and B colors. Is this possible? like so I making a wireframe material plugin, but I reaaaally don’t wanna unindex the meshes : O Any pointers are would be helpful,…

---

## [Force shader compilation](https://forum.babylonjs.com/t/force-shader-compilation/54789)

<div class="topic-metadata">

**Author:** [@mise](https://forum.babylonjs.com/u/mise)\
**Replies:** 7\
**Last updated:** [November 21, 2024, 5:17pm UTC](https://forum.babylonjs.com/t/force-shader-compilation/54789 "2024-11-21T17:17:11Z")

</div>

I’m trying to pre compile a bunch of shaders before creating my scene, but failing so far. can the mesh provided to shaderMaterial.forceCompilation() be any old mesh? how can I use “Parallel Shader Compilation”? …

---

## [How to use vertex attributes type as unsigned byte (maybe bug..?)](https://forum.babylonjs.com/t/how-to-use-vertex-attributes-type-as-unsigned-byte-maybe-bug/54614)

<div class="topic-metadata">

**Author:** [@dashandslash](https://forum.babylonjs.com/u/dashandslash)\
**Replies:** 3\
**Last updated:** [November 7, 2024, 6:29pm UTC](https://forum.babylonjs.com/t/how-to-use-vertex-attributes-type-as-unsigned-byte-maybe-bug/54614 "2024-11-07T18:29:14Z")

</div>

I have been trying to use custom attributes data for some mesh, and I need to pass a uint8 as attribute of the vertices. In the example I am creating a vertex buffer with data type UNSIGNED\_BYTE. It all goes well unt…

---

## [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…

---

## [Looking for someone to develop a Glitter shader effect](https://forum.babylonjs.com/t/looking-for-someone-to-develop-a-glitter-shader-effect/13036)

<div class="topic-metadata">

**Author:** [@TiagoSilvaPereira](https://forum.babylonjs.com/u/TiagoSilvaPereira)\
**Replies:** 28\
**Last updated:** [October 23, 2024, 4:55pm UTC](https://forum.babylonjs.com/t/looking-for-someone-to-develop-a-glitter-shader-effect/13036 "2024-10-23T16:55:47Z")

</div>

Hey guys, I’m looking for someone that can develop a shader similar to this glitter effect on Mug to be used in a BabylonJS application. If you are interested, please consider sending an email to contato@kingofcode.c…

---

## [Internal error compiling shader with Metal backend (no matching member function for call to ‘sample\_compare’)](https://forum.babylonjs.com/t/internal-error-compiling-shader-with-metal-backend-no-matching-member-function-for-call-to-sample-compare/54172)

<div class="topic-metadata">

**Author:** [@zb\_sj](https://forum.babylonjs.com/u/zb_sj)\
**Replies:** 2\
**Last updated:** [October 17, 2024, 9:03am UTC](https://forum.babylonjs.com/t/internal-error-compiling-shader-with-metal-backend-no-matching-member-function-for-call-to-sample-compare/54172 "2024-10-17T09:03:31Z")

</div>

This came into my sentry feed after adding cascade shadow. Affects only MacOS Chrome. I can’t reproduce this on my machine. BJS - \[13:16:57\]: Error: Internal error compiling shader with Metal backend. Compilation fail…

---

## [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…

---

## [May I ask how to unbind the texture binding of setTexture in shaderMaterial](https://forum.babylonjs.com/t/may-i-ask-how-to-unbind-the-texture-binding-of-settexture-in-shadermaterial/53693)

<div class="topic-metadata">

**Author:** [@zertaul](https://forum.babylonjs.com/u/zertaul)\
**Replies:** 5\
**Last updated:** [September 25, 2024, 8:21am UTC](https://forum.babylonjs.com/t/may-i-ask-how-to-unbind-the-texture-binding-of-settexture-in-shadermaterial/53693 "2024-09-25T08:21:09Z")

</div>

I couldn’t find an example in the official example where the specified texture is empty. I tried to modify the setTexture parameter to null or ‘’ in the official example myself, but it didn’t work. How do I write it

---

## [May I ask if it is possible to add custom shader effects on the GUI of Babylonjs,](https://forum.babylonjs.com/t/may-i-ask-if-it-is-possible-to-add-custom-shader-effects-on-the-gui-of-babylonjs/53316)

<div class="topic-metadata">

**Author:** [@zertaul](https://forum.babylonjs.com/u/zertaul)\
**Replies:** 20\
**Last updated:** [September 18, 2024, 6:29am UTC](https://forum.babylonjs.com/t/may-i-ask-if-it-is-possible-to-add-custom-shader-effects-on-the-gui-of-babylonjs/53316 "2024-09-18T06:29:11Z")

</div>

As the title suggests, I searched for a lot of information in the official website’s documentation, but couldn’t find a similar document. However, I tried using it myself “ let advancedTexture = BABYLON.GUI.AdvancedDynam…

---

## [HighlightLayer not working for AbstractMesh](https://forum.babylonjs.com/t/highlightlayer-not-working-for-abstractmesh/14061)

<div class="topic-metadata">

**Author:** [@Charlie\_Wheate](https://forum.babylonjs.com/u/Charlie_Wheate)\
**Replies:** 2\
**Last updated:** [August 13, 2024, 6:34am UTC](https://forum.babylonjs.com/t/highlightlayer-not-working-for-abstractmesh/14061 "2024-08-13T06:34:32Z")

</div>

const highlightLayer = new HighlightLayer( "hl", EngineEx.CurrentScene.scene ); highlightLayer.innerGlow = false; highlightLayer.addMesh(abstractMesh as Mesh, Color3.White()); Hello Ther…

---

## [WebGPU/WebGL shader differences](https://forum.babylonjs.com/t/webgpu-webgl-shader-differences/53326)

<div class="topic-metadata">

**Author:** [@Panuchka](https://forum.babylonjs.com/u/Panuchka)\
**Replies:** 29\
**Last updated:** [September 13, 2024, 6:08pm UTC](https://forum.babylonjs.com/t/webgpu-webgl-shader-differences/53326 "2024-09-13T18:08:16Z")

</div>

Hi everyone, long time no post! I have a weird one; testing once again webgpu vs webgl, but I wonder what could be the main issue when I only change the engine and my shading looks completely different in the other engi…

---

## [WebGPU Compute Shader - Manual sampler creation bug](https://forum.babylonjs.com/t/webgpu-compute-shader-manual-sampler-creation-bug/53241)

<div class="topic-metadata">

**Author:** [@edvart](https://forum.babylonjs.com/u/edvart)\
**Replies:** 3\
**Last updated:** [September 6, 2024, 1:01pm UTC](https://forum.babylonjs.com/t/webgpu-compute-shader-manual-sampler-creation-bug/53241 "2024-09-06T13:01:18Z")

</div>

Hi, I tried manually creating a texture sampler for my compute shader, but doing this (following the docs) seems to break the shader. Perhaps I’m missing some detail in how to set up and bind texture samplers? Or is this…

---

## [Extending HighlightLayer to work with gaussian splatting](https://forum.babylonjs.com/t/extending-highlightlayer-to-work-with-gaussian-splatting/53217)

<div class="topic-metadata">

**Author:** [@kmatzen](https://forum.babylonjs.com/u/kmatzen)\
**Replies:** 2\
**Last updated:** [September 5, 2024, 6:36am UTC](https://forum.babylonjs.com/t/extending-highlightlayer-to-work-with-gaussian-splatting/53217 "2024-09-05T06:36:56Z")

</div>

Does anyone have an opinion on the best way to support HighlightLayer for gaussian splat assets? I took a look into the HighlightLayer implementation and it seems to use the glowMapGeneration shader even if the mesh has…

---

## [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…

---

## [Trying to better understand (auto?) depth write in shaders?](https://forum.babylonjs.com/t/trying-to-better-understand-auto-depth-write-in-shaders/36358)

<div class="topic-metadata">

**Author:** [@inteja](https://forum.babylonjs.com/u/inteja)\
**Replies:** 11\
**Last updated:** [August 11, 2024, 11:48pm UTC](https://forum.babylonjs.com/t/trying-to-better-understand-auto-depth-write-in-shaders/36358 "2024-08-11T23:48:12Z")

</div>

There’s something I’m not understanding about shader depth writing. I have separate ShaderMaterial and corresponding depth ShaderMaterial, the latter I then apply using depthRenderer.getDepthMap().setMaterialForRenderin…

---

## [Write to additional texture in ShaderMaterial shader](https://forum.babylonjs.com/t/write-to-additional-texture-in-shadermaterial-shader/52495)

<div class="topic-metadata">

**Author:** [@edvart](https://forum.babylonjs.com/u/edvart)\
**Replies:** 2\
**Last updated:** [August 2, 2024, 8:13pm UTC](https://forum.babylonjs.com/t/write-to-additional-texture-in-shadermaterial-shader/52495 "2024-08-02T20:13:05Z")

</div>

Is it possible to render to an additional, off-screen texture in a shader used in a ShaderMaterial? I’m doing some point-picking on a pointcloud, and currently, I’m doing two totally separate passes. The first pass does…

---

## [How to apply PostProcess only to 1 of the sphere](https://forum.babylonjs.com/t/how-to-apply-postprocess-only-to-1-of-the-sphere/52320)

<div class="topic-metadata">

**Author:** [@Nagatori](https://forum.babylonjs.com/u/Nagatori)\
**Replies:** 2\
**Last updated:** [July 26, 2024, 12:04pm UTC](https://forum.babylonjs.com/t/how-to-apply-postprocess-only-to-1-of-the-sphere/52320 "2024-07-26T12:04:37Z")

</div>

Hey guys, so I am here trying to post process only on one of the sphere. Currently it happens on both of them. I read that you to do that, I would need at least a 2nd camera. I have added one (Free Camera), but I do no…

[Previous page](https://forum.babylonjs.com/tag/shader/11.md?match_all_tags=true&tags%5B%5D=shader)

[Next page](https://forum.babylonjs.com/tag/shader/11.md?match_all_tags=true&page=2&tags%5B%5D=shader)
