Design How much does shaders improve the graphics?

Discussion in 'Game Design, Development And Publishing' started by Gedor Games, Aug 11, 2016.

  1. Gedor Games

    Gedor Games Member

    Joined:
    Jul 8, 2016
    Posts:
    52
    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.
     
  2. Alvare

    Alvare Member

    Joined:
    Aug 11, 2016
    Posts:
    48
    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.
     
  3. HayManMarc

    HayManMarc Member

    Joined:
    Jun 21, 2016
    Posts:
    866
    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)
     
    Yal likes this.
  4. HayManMarc

    HayManMarc Member

    Joined:
    Jun 21, 2016
    Posts:
    866
    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.
     
    ParodyKnaveBob and Lonewolff like this.
  5. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,453
    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.
     
  6. chance

    chance predictably random Forum Staff Moderator

    Joined:
    Apr 22, 2016
    Posts:
    776
    Actually, a shader that turns the entire screen solid black may help.

    At least that's true for some of my graphics.
     
  7. Genetix

    Genetix Member

    Joined:
    Jun 22, 2016
    Posts:
    611
    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.
     
  8. Seabass (The Human)

    Seabass (The Human) Member

    Joined:
    Jun 20, 2016
    Posts:
    354
    Let me give you an example of shaders.
    [​IMG]

    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.
     
    Gedor Games and ConsolCWBY like this.
  9. eltantillo

    eltantillo Member

    Joined:
    Jun 20, 2016
    Posts:
    34
    Here I use a shader to create a glow effect that affects only the player's sprite
    [​IMG]
     
  10. Roa

    Roa Member

    Joined:
    Jun 20, 2016
    Posts:
    543
    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: Aug 12, 2016
    Gedor Games likes this.
  11. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,586
    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.
     
  12. Roa

    Roa Member

    Joined:
    Jun 20, 2016
    Posts:
    543
    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.
     
    Seabass (The Human) likes this.
  13. ConsolCWBY

    ConsolCWBY Member

    Joined:
    Jul 26, 2016
    Posts:
    141
    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!
     
  14. gamedev8975z

    gamedev8975z Member

    Joined:
    Sep 18, 2018
    Posts:
    9
    any shader for fonts to look glossy ?
     
  15. TheSnidr

    TheSnidr Heavy metal viking dentist GMC Elder

    Joined:
    Jun 21, 2016
    Posts:
    459
    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:
    [​IMG]
    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: Sep 24, 2018
    dannyjenn and sitebender like this.
  16. Niels

    Niels Member

    Joined:
    Jun 22, 2016
    Posts:
    797
    Shaders are like lensfilters
     
  17. Niels

    Niels Member

    Joined:
    Jun 22, 2016
    Posts:
    797
    Any chance on a tutorial or shadercode you would like to share?
     
  18. Yal

    Yal GMC Memer GMC Elder

    Joined:
    Jun 20, 2016
    Posts:
    3,453
    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).
     
  19. muki

    muki Member

    Joined:
    Mar 5, 2017
    Posts:
    220
    Not at all necessary, it's an enhancement. In my case, I use shaders for a blur/depth-of-field effect, and color-shifting.

     
    Carloskhard, Kyon and sitebender like this.
  20. kupo15

    kupo15 Member

    Joined:
    Jun 20, 2016
    Posts:
    755
    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?
     
  21. RangerX

    RangerX Member

    Joined:
    Jun 20, 2016
    Posts:
    2,586
    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.
     
  22. IndianaBones

    IndianaBones Member

    Joined:
    Jul 5, 2016
    Posts:
    2,107
  23. sp202

    sp202 Member

    Joined:
    Sep 26, 2016
    Posts:
    965
    @muki That looks amazing, really dig the blur with parallax aesthetic.
     
  24. icuurd12b42

    icuurd12b42 TMC Founder GMC Elder

    Joined:
    Apr 22, 2016
    Posts:
    1,835
    Coincidently this guy uploaded a video today


    he has a great series on GM Shaders
     
  25. IndianaBones

    IndianaBones Member

    Joined:
    Jul 5, 2016
    Posts:
    2,107

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice