Design How much does shaders improve the graphics?

G

Gedor Games

Guest
I have read about shaders in the manual but have not used it yet, is it something that is necessary in order to make great graphic? It seems to use some other language than GML but I dont understand why you would need it and what difference it makes in how your game looks.

So it would be nice to hear people who have used shaders what there experience are and maybe even show some pictures on the difference between using shaders and not.
 

Alvare

Member
Necessary for great graphics? Depends on what you want the shader to do and if you're working with 2D or 3D. I personally prefer post processing tone mapping, physically based material shaders and nice reflective/refractive effects. Other nice effects are Ambient Occlusion, Depth Of Field and SSAA.
 

HayManMarc

Member
Shaders won't really improve your graphics. They mostly alter or enhance your graphics. They are an effect, like particle systems are an effect.

(Also, google is your friend. Search: gml shaders)
 
  • Like
Reactions: Yal

HayManMarc

Member
It really depends.

I have seen some stunning oceans, created solely with a flat triangle grid and shaders. Things that simply can't be achieved without shaders (not in real time anyway).
So, I guess you could say that shaders are a different type of graphic altogether. I suppose what I meant was if you can't draw more than an ugly stickman, a shader isn't going to help much. ;)


At least that's what I a-reckon.
 

Yal

🐧 *penguin noises*
GMC Elder
I personally really like basic palette swap shaders... they're useful for things like hurt flashing, day/night cycle hue effects, or plain RPG-style palette swapping that's there to cut down on the number of sprites you're using in your game. Pretty limited in each of their uses, but each use is unparalleled in how easy it is to implement the effect compared to other alternatives.
 

Genetix

Member
I use a shader in my game Rogue Harvest... When the player eats a wild mushroom it causes a very trippy effect for about a minute... The best thing you can do with a shader is find a way to not 'improve' graphics, but bend them to your will to accomplish making the game look like what you have in your head.
 

Fern

Member
Let me give you an example of shaders.


That text is blurred in real-time. That is one way you can make the scene have a sense of depth. You would have to blur this yourself normally but then you wouldn't be able to dynamically have text drawn like I have here.
 

Roa

Member
Shaders are pretty much the future of all rendering. They are able to produce very expensive process relatively quick on a GPU, faster than crunching on the base clock. You pretty much wont find a professional game without them anymore, especially 3d. 3d stop gaining technology for data crunching directly in the mid 2000s and everything since has been stacks and stacks of shader materials and render pass shaders on top of each other. If you stripped all the modern games of shaders, most would probably looks like under detailed clay blobs.
 
Last edited:

RangerX

Member
Shaders are pretty much the furture of all rendering. They are able to produce very expensive process realitively quick on a GPU, faster than crunching on the base clock. You pretty much wont find a professional game without them anymore, expecially 3d. 3d stop gaining tehcnology for data crunching directly in the mid 2000s and everything since has been stacks and stacks of shader materials and render pass shaders on top of each other. If you stripped all the modern games of shaders, most would probabyl looks like under detailed clay blobs.
True that ^^
... and the clay isn't all that detailed either since the day there was geometry shaders! Millions and millions of polygons aren't needed anymore for most games.
 

Roa

Member
True that ^^
... and the clay isn't all that detailed either since the day there was geometry shaders! Millions and millions of polygons aren't needed anymore for most games.
Yeah, you have like model mip mapping now with tessellations which can take textures and add in real time, geometry to a model for up close HD and you have LOD shaders that can blend in different qualities of models very easily. Geometry crunching hasn't improve visual fidelity in years.
 
C

ConsolCWBY

Guest
I have been trying to learn shaders programming with tutorials. I find it interesting to say the least. But I look at it this way:
It is just another tool in your arsenal. Depending on the implementation, it can produce stunning effects, or feel completely annoying and intrusive. The best way to know is to experiment with them and find that "sweet spot" for use in your project. As it is, I've produced some interesting effects just by playing with tutorial examples. Try it - you just might get hooked!
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Shaders are small programs that run on the graphics card rather than on the CPU (like the rest of the game does). This allows you to modify anything you draw before actually drawing it to the screen.
There are two kinds of shaders, those that affect vertices (the points in a triangle) and those that affect fragments (ie. pixels). You can move vertices, and you can change the colour of the final pixel.

Here's a 3D model running one of my shaders, which animates vertices, and extrudes the vertices pointinf away from the camera and turning them black:

This is a fairly advanced effect, but it shows you some of what shaders can do.

There are many effects that can be done with shaders, and it's something I really recommend learning. They do have the potential to improve your graphics greatly.
 
Last edited:

Yal

🐧 *penguin noises*
GMC Elder
any shader for fonts to look glossy ?
Define "glossy". Sparkling? Reflecting light? You could get some gloss just by using draw_text_colour() and then provide four different colors (white in the top left to simulate light, etc).
 

kupo15

Member
Here I use a shader to create a glow effect that affects only the player's sprite
How did you do that so it doesn't effect the entire player? Do you define a light point and use the texture coor of each pixel the shader gets as a comparison to that light source to determine how much of the glow should be applied to that pixel?
 

RangerX

Member
Any good sources to learn how to handle/make shaders for GMS?
Am totally illiterate about this and I should would like to be able to at least use one made by someone else down the road.
 
I

icuurd12b42

Guest
Any good sources to learn how to handle/make shaders for GMS?
Am totally illiterate about this and I should would like to be able to at least use one made by someone else down the road.
Coincidently this guy uploaded a video today

he has a great series on GM Shaders
 
Top