# Trying to Understand a Shader

**URL:** <https://discourse.processing.org/t/trying-to-understand-a-shader/27965>\
**Category:** Coding Questions\
**Created:** [February 20, 2021, 10:10pm UTC](https://discourse.processing.org/t/trying-to-understand-a-shader/27965 "2021-02-20T22:10:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![BigBigRed](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@BigBigRed](https://discourse.processing.org/u/BigBigRed)\
**Post date:** [February 20, 2021, 10:10pm UTC](https://discourse.processing.org/t/trying-to-understand-a-shader/27965/1 "2021-02-20T22:10:43Z")

</div>

I am trying to understand a shader file.  
They file has its own function to generate/produce noise.  
They have a function call ‘col.r+=noise(uv.xyy\*(12. … continues’.  
I understand that ‘uv’ refers a texture with u being right/left and v being up/ down.  
it seems that the xyy piece is getting a/ the color, but i can’t fathom what xyy would return.  
Is it performing some type of color modification/substitution?

Thanks

---

<div class="post-metadata">

**Author:** ![BigBigRed](https://avatars.discourse-cdn.com/v4/letter/b/d6d6ee/32.png) [@BigBigRed](https://discourse.processing.org/u/BigBigRed)\
**Post date:** [February 21, 2021, 5:15pm UTC](https://discourse.processing.org/t/trying-to-understand-a-shader/27965/2 "2021-02-21T17:15:20Z")

</div>

Apparently this is ‘swizzling’ in shader speak.  
Now I have to go back thru and try to understand why.

again thanks

---

<div class="post-metadata">

**Author:** ![paulgoux](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@paulgoux](https://discourse.processing.org/u/paulgoux)\
**Post date:** [February 21, 2021, 7:57pm UTC](https://discourse.processing.org/t/trying-to-understand-a-shader/27965/3 "2021-02-21T19:57:08Z")

</div>

Have you tried the book of shades or the processing reference. Both are good intros. I understand a bit about basic shades, though difficulty ramps up quick with shaders.
