1. jf_knight

    Shaders Image sharpen shader

    Hello. I'm writing an image sharpening filter in GM2 and need some assistance. I'm not getting any changes on my image when moving a slider tied to "Sharpen". Here's what I have; varying vec2 v_texcoord; uniform vec2 resolution; uniform float Sharpen; void main( ) { vec4 colour =...
  2. jf_knight

    Graphics Shadertoy to Gamemaker GLSL converter

    Hello. I have something to share with you all. I have created a web app that converts simple Shadertoy shader code into GameMaker GLSL ES shader code. It performs the appropriate changes outlined in shader master Xor's tutorial, and I thought i'd automate it as well as give the extra create and...
  3. Edwin

    Legacy GM How to change the variables in shader from event code?

    Hello, guys. I have a small shader that makes the sprite go fully white. I just want to this whiteness disappears in time. I'm very new at shaders, so I have no idea how all this works. My shaders Vertex code is default, but the Fragment code looks like this: varying vec2 v_vTexcoord; varying...
  4. MilkMan5x

    Demo Shader-based procedurally rendered fire effect

    -=[ Shader based procedural fire effect ]=- GitHub repo : =============================================================== Hello again, Recently I wrangled up this decent looking fire effect after getting inspired from these two materials: Hugo...
  5. N

    Understanding GLSL Shaders

  6. ConstaChymic

    Question - Code Default vertex & fragment shader when lighting is used?

    Hi. I'm wondering what default glsl scripts are used when you are drawing things in 3d and are using lights. I've been trying to make my own but I cannot for the life of me figure out how to use any of the gl_* variables provided (bar a few such as gl_Fragcoord and gl_Position), as most of my...
  7. jujubs

    Shaders Mysterious syntax error

    So I followed this tutorial right here to learn how to change my sprites' colors using shaders: It all seemed simple enough, and indeed, I managed to add some color to my game sprites without much hassle. However, the method used in the video also changes how transparency behaves. My player...
  8. Kaliam

    How to pass a vec4 array to a shader? (GLSL)

    Hello, I'm just trying to use a shader uniform that is declared as such: uniform vec4 lightMap[32]; This compiles just fine in GLSL, however, there isn't a GMS2 function that is specifically for a vec4. I've tried using a float array of arrays that represent the vec4's in an array but can't...
  9. Kaliam

    Question - Code No textureSize() funtion in GMS2 GLSL Shaders?

    The title says it all, I'm just curious why this method doesn't exist in GMS2 since it's been in GLSL since version 1.30. It doesn't make a difference if you're using GLSL or GLSL ES, although the type of compilation error you get is different. Just curious, didn't want to have to pass in all...
  10. Blokatt

    Asset - Shaders BktGlitch - A highly customisable glitch shader

    Hello everyone, I'm here (a bit late) to tell you about an asset I have released a couple months ago. BktGlitch is a glitch fragment shader package featuring: A variety of effects controllable using parameters through simple setup functions A number of presets, which can be easily set using a...
  11. The Reverend

    Shaders Need help with MRT shader in GLSL (not ES)

    Hi I need help with a MRT (Multiple Render Targets) shader in GMS 2. But first credits to the assets artist: Michele "Buch" Bucelli: Test situation: The view is smaller than the room and follows the player object. I want to draw everything in the game...
  12. The Reverend

    Question - Code GLSL version in GMS 2?

    Does anyone know up to what GLSL (not ES) version we can use in GMS 2?
  13. The Reverend

    Shaders Basic HLSL (and some GLSL) info needed [one more Q]

    I'm working on my next shader tutorial and realized I'd need some help before feeding false information to the community watching the series. The first questions are about GLSL ES: Are these statments correct? 1. GM:S 1.2+ is using GLSL ES 1.0 2. and GMS 2 is using GLSL ES 2.0 And the rest is...
  14. Azenris

    Legacy GM [Solved] Multi target rendering

    So I'm attempting to get MTR to work. varying vec2 v_vTexcoord; varying vec4 v_vColour; void main() { vec4 colour = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord ); gl_FragData[0] = colour; gl_FragData[1] = vec4( 0, 0, 0, 1 ); } This fails with the error: array index out...
  15. S

    Shaders Burnt out on this shader error

    Hey yall, just really need a second (or more) pair of eyes on this because i'm not sure what i'm missing. Trying to make a 2d directional spotlight effect with a shader. Heres the SpotLight() function that does the lighting calc. Heres the Main() of the shader so you can see how SpotLight()...
  16. Poking Pug

    Question - Code What GLSL version is Studio v2 using?

    Hi all! I saw that v2 of Studio now has nice and simple ways of creating your own vertex and fragment shaders, but nowhere in the manual did I see the current supported version of the GLSL syntax. For all target platforms it says we can use GLSL ES and it also mentions that for HTML5 we need...
  17. Rackover

    Shaders Looking for a Multiply Shader

    Hi, The artist i'm working with applied a cool effect on his photoshop mockup using a layer set with the blend mode "Multiply". As I already managed to create an Overlay blend mode shader, I'm looking forward to have a multiply one as well ; problem is, finding good documentation about it seems...
  18. TotallyAverageGamez

    Shaders [SOLVED] Outline Shader: How to reference a nearby pixel's alpha?

    Hey All, Have a question about shader code. I am trying to create an outline shader that draws a border (highlight) 1px wide around an object. The code I am using so far is this: varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec4 outlineColor; void main() { vec4 originalColor...
  19. TotallyAverageGamez

    Copying a portion of a tilemap? draw_tilemap_ext?

    I would like to copy part of a tilemap to a surface so I can pass it to a shader. The problem is that there only seems to be one function for drawing / copying a tilemap; the draw_tilemap() function, which draws the entire thing (requiring the target surface be the size of the room, which is...
  20. Mool

    Shaders GLSL; float to shader + analyze(if)

    Hi i have a little problem. (line 35) If i pass a float (since int doesnt work) to my shader and let this value check there(If), then the if does not work. "float amount" is always 0! I dont know why, if i hardcode amount = 1.0 ... then everything is fine. Has anybody an answer? // // Simple...