#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# Tutorial 24 - Basic 3D Graphics Using Shaders

edited November 2012 in General Posts: 563

As you would have seen by the feature list provided by @Simeon, Version 1.5 of Codea is a huge update. In addition to camera access, image blend modes and a tween library for simple animation, it includes full access to shaders and a shader editor. This feature gives you full access to GLSL (OpenGL Shading Language) vertex and fragment shaders. This allows you to implement some very fancy effects but it also means that there are a bunch of new concepts to understand and a new language to get to grips with. To wet your appetite and get you ready for v1.5, I have written a getting started tutorial for shaders:

http://codeatuts.blogspot.com.au/2012/11/tutorial-24-basic-3d-graphics.html

As always comments and suggestions are invited.

Tagged:

• Posts: 2,161

Looks good - except for the matrices part. Basically because you don't really mention matrices and the whole 4D-to-2D is a bit sparse on detail. If you don't fancy expanding on what's going on with matrices you could link to my post on them.

• Posts: 688

An interesting read and a good intro to the subject of shaders, thank you.

• Posts: 563

.@Andrew_Stacey - I'm happy for you to run with the pure maths mantle! Being an engineer I only try and learn as much as I need to achieve the outcome. I havent needed too much in the way of matrix operations (yet), hence the lack of substantive discussion. I will stick a link in to your tutes on the subject.

.@TechDojo - thanks. I'm planning on having a play with what else you can do with shaders and writing that up in due course.

• Posts: 2,161

.@Reefwing Sure - I know my interest in maths is a bit unusual. Just think that the choice is either to say it all or to say nothing. I've seen confusion reign here before and so am wary of short snippets that could be misleading.

• Posts: 666

@Reefwing - maybe a simple "grid" of shaders running on a single screen doing things like particle emission or ripples/glows? That might show off the power of what was created.

• Posts: 563

.@aciolino - good thinking. I will have a play with that. I think the TLL guys plan on packaging up some standard shaders as part of the new release (there is already a ripple one which is very impressive).

.@Andrew_Stacey - I can't find the link to your matrix post. Could you head me in the right direction?

• Posts: 2,161
• Posts: 563

Thanks Andrew - That is somewhat more detailed!

• Posts: 666

It's painful to wait for the shaders! Argh!