Shader Cheat Sheet?

I’m looking at making a shader for my project to help me debug my shape. The I formed after reading a bit about shaders is that I should use a fragment shader that calculates the distance from the center of the shape out (my shape is a sphere that I’ve made).

I was hoping to use this exercise to learn a bit more about shaders in JME in general but I’ve hit a bit of a roadblock.

Every resource I’m reading seems to assume that I know the reasons that they’re using certain variables in their shader inputs and which GLSL version to use.

Is there a cheat sheet/tutorial that’ll go over what the input variables are and why I’d want to use certain versions of GLSL over another?

Ok. Nevermind. Found what I wanted.

There IS a cheat sheet out there and it immediately answered everything…

:musical_score: I can see cleeeeeeeeeeearly now the rain is gone. :microphone:


While youtube videos are not my own preferred way to learn to code… a nice monkey put these together some time back:


I think I saw the link to those… But I have the same issue with tutorials. I kinda prefer searchable text so I can quickly search after the fact. I’ll check these out though as well!


My preferred way for learning shaders was to take an existing working one and then repeatedly “break and fix it” with purpose.


Check also the pdf posted here: Global uniforms cheatsheet


Whoa. Ok. That helps out a lot too! Thanks!

Nice videos
@pspeed thanks for sharing the link. :slight_smile:

nice is an overstatement ;), but thanks Paul :slight_smile:, hope you’ve been doing ok. I remember the weekend I made those very ‘clearly’. Someone said it couldn’t be done, so I crammed in the Orange book the day before (and online articles), then the next day I was knackered and delirious from having both the flu and being slightly intoxicated on Jack Daniels and coke, while recording all of them. Dam those were good times haha.