• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

shader

  1. MezzSoft

    SOLVED Trying to draw a shadow below GUI elements using shader

    Hello, I'm trying to figure out a way to add a 1 pixel shadow effect to my game's HUD, basically just duplicating the entire Draw GUI event in black with a positive x+y coordinate position. As there's a lot of sprites and different elements being drawn, drawing them twice in c_black would be...
  2. DrStupid87

    How can I change a shader to draw a sprite once, instead of twice over a set of vertexes?

    Hi again, So I've been working on a shader for a while now but there's a strange issue with it I just don't know how to solve despite a lot of googling. I have a vertex buffer that generates two triangles and fills that with a sprite, the idea being to generate pieces of overlay with it. What...
  3. Durgal

    Shaders GMS2 Shader Optimizations

    While working on importing my 1.4 project to 2.X I noticed what I can only assume is a HUGE optimization in the way shaders are processed. Let me show you the difference between how the shader looks in 1.4 versus 2.X You may have noticed that the inhabitants of the world in GMS2.X are...
  4. S

    Shaders Trying to create a shader from a filter

    Hello, I am trying to use the built in Heat Haze filter as a shader on a single instance since creating a single layer for one object and applying a filter seems inefficient, and I'd like the flexibility of being able to use a shader rather than a filter. I have taken the filter code from the...
  5. DrStupid87

    GML Advice on transparency with shaders inside of vertex buffers

    Hi all. So I've got two vertex buffers that draw overlay pieces on my map. I want to put a shader on them so I can get a wind effect working on smaller pieces of grass. Been following a tutorial on it and have hit a snag. Here's the code for my vertex buffer: /// @description Create vars for...
  6. Fredrickmedck

    Applying a shader to GUI with DnD

    Hello! Pretty new to this, and this is probably a noob question but I still need help :) I want to an apply a really cool shader to my game (Horri-Fi, it’s really swell!!) but it doesn’t work with my HUD-layer. I’ve seen a lot of posts about this and solutions that all involve coding. I don’t...
  7. W

    SOLVED Can apply the shader to the screen?

    I made a shader to swap pallets, but is there no way to apply this to the screen? shader code: varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec4 colorMatch0; uniform vec4 colorMatch1; uniform vec4 colorMatch2; uniform vec4 colorMatch3; uniform vec4 colorReplace0; uniform vec4...
  8. Metzger

    Shaders Help getting heat wave shader to work

    Hiya! I was trying to use heat wave shader in this post Shader thread Is there away getting this to work on GMS1? I tried this directly thou I admit I have no knowledge about shaders and it failed. Shader shd_wave: varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform float Time; uniform...
  9. J

    [SOLVED] Issue trying to imitate visual effect with shaders and surfaces

    Hey, so I've been trying to recreate an effect shown in the video "Weird POV effect" by Chris Long (Couldn't share link because it immediately flagged the post for review ¯\_(ツ)_/¯). Basically it's an optical illusion designed to make it so things are only visible when they are in motion, and...
  10. K

    Shaders How to fix stretching on a shader

    So i found this shader on ShaderToy, I've had help converting it but it's currently stretched on the X axis a bit and i don't know how to fix it, i tried messing with a few variables to see if that does anything but that just kinda breaks it, kinda reminds me of a badly stretched PowerPoint...
  11. EL0FBRENO

    GameMaker How to NOT draw vertices from a Vertex Buffer using a shader

    I want to stop drawing the face of a cube if there's another one beside it, like it's done in minecraft for optimization. But i want to do that using shaders, because the shaders run in gpu instead of the cpu, that makes it run faster etc. etc. Besides that the vertex buffers are a bit annoying...
  12. Tangerine

    Shaders Randomize sway in grass shader

    I have a shader that moves the top vertex of grass sprites for simulate a sway effect in a windy day. The problem is that the sway has the same value of the uniform I pass and I would want to randomize it for each grass sprite. (Without passing a different uniform for each grass sprite) I was...
  13. W

    Shaders Problem in applying shader to merge sprites

    Hi, So I'm trying to merge sprites with shader, and i understand we need to get sprites uv location and apply it in the shader. However, looks like it's not working as expected. The code is following the discussion here...
  14. Tangerine

    Shaders How to reuse shader code from other shaders?

    What the title says. Is it possible to reuse code from other shaders without needing to copy-paste everytime? I reuse code between a lot of shaders and the process of editing the code is very painful as I lose a lot of time.
  15. Tangerine

    GameMaker Draw vertex buffer without stacking alpha

    I have a vertex buffer for drawing the shadows of my game. I draw the vertex with an alpha of 1 and all shadow sprites are black. Then with a shader I reduce the alpha of the drawn vertex buffer to 0.5. The problem is that the alpha overlaps with each shadow and I would want all of the shadows...
  16. E

    shader_get_uniform returns undefined in HTML5

    Trying to put together an HTML5 build of the game I'm making for Windows, and it seems like the only hangup is an outline shader I got from the marketplace. Unhandled Exception - Uncaught { message : "unable to convert undefined to a number", longMessage : "unable to convert undefined to a...
  17. jak

    GameMaker Drawing Abstract Circle On Layer With Shader

    Hi, I'm current making a project where I have an interference shader that goes off every (relatively) random amount of time displacing the pixels horizontally, I'm trying to draw abstract circles in the background (in that same layer) that change size but keep the same line width overall. I've...
  18. FoxyOfJungle

    Asset - Shaders 2D Water Reflections (Top Down RPG + Platformer)

    2D Water Reflections An easy to use and customizable water object that allows you to display reflections! Just drag the object to the room and you have a water! Features: Easy to use; Just drag the object to the room; Supports ANY application_surface, window, camera, viewport resolution...
  19. M

    Shaders Help with CRT Effect

    I've been looking all over to find a way to make a CRT effect similar to the one below but I can't find anything. Can I get some help on how I could do this?
  20. Tangerine

    GameMaker How to fix z-fighting when using z-tilting?

    I'm using in my project the z-tilting shader from this article: https://gamemaker.io/es/blog/z-tilting-shader-based-2-dot-5d-depth-sorting When I have two sprites that share a very similar y position and very similar z position sometimes they overlap or get drawn in the wrong order. For example...
Top