# Can't access my shader parameter from code

**URL:** <https://forum.godotengine.org/t/cant-access-my-shader-parameter-from-code/97604>\
**Category:** Shaders\
**Tags:** godot-4, gd-shader\
**Created:** [January 9, 2025, 8:30am UTC](https://forum.godotengine.org/t/cant-access-my-shader-parameter-from-code/97604 "2025-01-09T08:30:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![lowwaels98](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/l/e56c9b/32.png) [@lowwaels98](https://forum.godotengine.org/u/lowwaels98)\
**Post date:** [January 9, 2025, 8:30am UTC](https://forum.godotengine.org/t/cant-access-my-shader-parameter-from-code/97604/1 "2025-01-09T08:30:46Z")

</div>

### Godot Version

`4.3 stable `

### Question

` the shader tutorials on the doc not working take look

 ![error](https://forum.godotengine.org/uploads/default/original/3X/1/c/1cae0b38a4162d71b906404249f839bf614eee9d.png)  
 ![error2](https://forum.godotengine.org/uploads/default/original/3X/1/6/164446019c2d9498b357ea9b7c4e1295e4554176.png)  
so i follow the doc to make my first shader and when i did run the code  
the code didn’t change the blue color value

`

---

<div class="post-metadata">

**Author:** ![zdrmlpzdrmlp](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/z/5daacb/32.png) [@zdrmlpzdrmlp](https://forum.godotengine.org/u/zdrmlpzdrmlp)\
**Post date:** [January 9, 2025, 8:56am UTC](https://forum.godotengine.org/t/cant-access-my-shader-parameter-from-code/97604/2 "2025-01-09T08:56:21Z")

</div>

do you plan to run that code on editor or runtime?  
if you want it to run on editor while you edit your shader, then you will need to use @tool

---

<div class="post-metadata">

**Author:** ![lowwaels98](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/l/e56c9b/32.png) [@lowwaels98](https://forum.godotengine.org/u/lowwaels98)\
**Post date:** [January 9, 2025, 9:04am UTC](https://forum.godotengine.org/t/cant-access-my-shader-parameter-from-code/97604/3 "2025-01-09T09:04:45Z")

</div>

> [@zdrmlpzdrmlp](#):
>
> runtime

at runtime

---

<div class="post-metadata">

**Author:** ![zdrmlpzdrmlp](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/z/5daacb/32.png) [@zdrmlpzdrmlp](https://forum.godotengine.org/u/zdrmlpzdrmlp)\
**Post date:** [January 9, 2025, 9:06am UTC](https://forum.godotengine.org/t/cant-access-my-shader-parameter-from-code/97604/4 "2025-01-09T09:06:16Z")

</div>

ok i know why, it’s “blue” not “Blue”  
change it to

```auto
self.material.set_shader_parameter("blue", blue_isnot_value)

```

---

<div class="post-metadata">

**Author:** ![lowwaels98](https://forum.godotengine.org/letter_avatar_proxy/v4/letter/l/e56c9b/32.png) [@lowwaels98](https://forum.godotengine.org/u/lowwaels98)\
**Post date:** [January 9, 2025, 9:16am UTC](https://forum.godotengine.org/t/cant-access-my-shader-parameter-from-code/97604/5 "2025-01-09T09:16:59Z")

</div>

new error can you help

 ![error3](https://forum.godotengine.org/uploads/default/original/3X/f/9/f99c00230e2f21129547c45940d96e11e0fb0229.png)  
 ![error4](https://forum.godotengine.org/uploads/default/original/3X/7/3/7345db9b852b4bd1b3e38739e81be65cddde5c48.png)  
 ![thanks](https://forum.godotengine.org/uploads/default/original/3X/8/9/895237881fcaf2f1fb6cd0b9917b99d94358a1b6.png)  
thanks for help the name was the what break my shader i did make the  
B and not b as the name in the shader thanks alot also the other error  
i just cope my olde shader and made new one and it fixed thanks 🙂 zdrmlpzdrmlp

---

<div class="post-metadata">

**Author:** ![system](https://forum.godotengine.org/uploads/default/original/2X/4/4b0a7fa8a6334634b94a13d421f0d99e6f04e21f.svg) [@system](https://forum.godotengine.org/u/system)\
**Post date:** [February 8, 2025, 9:17am UTC](https://forum.godotengine.org/t/cant-access-my-shader-parameter-from-code/97604/6 "2025-02-08T09:17:24Z")

</div>

Closed on February 8, 2025, 9:17am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
