What do I need to understand glsl?

I want to make some good graphic effects but can’t understand what I am coding(copying and pasting code) so, how to start?

Hi. First things first, you should know what Corona has provided for you and so on, found here. As far as what you can expect from the language, see the second half of this document.

This is a huge subject, so there isn’t any “just do this” approach. Also, you don’t say what you’re copy-and-pasting or if anything in particular is a mystery. Quite a lot of it boils down to math.

You should check out the Book of Shaders. A lot of the fancy stuff you see in the wild is built up on the techniques it covers so far.

Inigo Quilez, one of the Shadertoy guys, also has a great page. (Maybe you saw some shaders by " iq"?)

This also looks promising; I know this team has done a lot with WebGL. Some setup involved.

It’s usually expensive to do conditionals, i.e.

if (something) { // DO STUFF }

in fragment shaders. Big batches of neighboring pixels are processed in parallel, but this expects the code in question to be following the same flow, which branching obviously breaks. For that reason, you might also run across branchless conditionals.

Advanced material :

Looks like a few of the older entries here are available now. I haven’t kept up with these, but do own the last four or five ShaderX titles and got a lot of ideas out of them. All the GPU Gems are also free now, too.

1 Like

thank you,

I ll see everything you posted right now,

nohak

I already knew about Corona documentation related to shaders, that’s actually the reason of this topic.

As for the “cheatsheet” I m sure I was reading at it sometime ago, but didn’t understand anything yet.

I just looked into Inigo Quilez’s post and got it bookmarked.

Book of shaders is an open-mind way to learn graphics, now I could say I’m getting some basic knowledge of graphics thanks to it. That page was what I was looking for.

I’ll see soon what’s advanced material, but for now, I’m actually learning. So, thank you.

Hi. First things first, you should know what Corona has provided for you and so on, found here. As far as what you can expect from the language, see the second half of this document.

This is a huge subject, so there isn’t any “just do this” approach. Also, you don’t say what you’re copy-and-pasting or if anything in particular is a mystery. Quite a lot of it boils down to math.

You should check out the Book of Shaders. A lot of the fancy stuff you see in the wild is built up on the techniques it covers so far.

Inigo Quilez, one of the Shadertoy guys, also has a great page. (Maybe you saw some shaders by " iq"?)

This also looks promising; I know this team has done a lot with WebGL. Some setup involved.

It’s usually expensive to do conditionals, i.e.

if (something) { // DO STUFF }

in fragment shaders. Big batches of neighboring pixels are processed in parallel, but this expects the code in question to be following the same flow, which branching obviously breaks. For that reason, you might also run across branchless conditionals.

Advanced material :

Looks like a few of the older entries here are available now. I haven’t kept up with these, but do own the last four or five ShaderX titles and got a lot of ideas out of them. All the GPU Gems are also free now, too.

thank you,

I ll see everything you posted right now,

nohak

I already knew about Corona documentation related to shaders, that’s actually the reason of this topic.

As for the “cheatsheet” I m sure I was reading at it sometime ago, but didn’t understand anything yet.

I just looked into Inigo Quilez’s post and got it bookmarked.

Book of shaders is an open-mind way to learn graphics, now I could say I’m getting some basic knowledge of graphics thanks to it. That page was what I was looking for.

I’ll see soon what’s advanced material, but for now, I’m actually learning. So, thank you.