• 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!

glsl

  1. T

    Help with Combining Shaders

    Hi! I am trying to add a pixelation shader to an existing shadow shader that I have been using, but I can't seem to figure it out. I've seen several posts about how to combine shaders, but no matter what I have tried nothing seems to be working. Any help would be greatly appreciated! I am brand...
  2. Gonix

    SOLVED Shaders filling textures background

    Hi guys, I'm trying to learn how to use glsl shaders but I stumbled across an issue, every time I try to change pixel alpha, it just fills the texture with a rectangle. Here is my shader's code, I'm trying to make it draw outline around sprites, but it seems not to detect the alpha of nearby...
  3. GamingEngineer

    Shaders 3D cubemap reflections not showing up on second monitor

    Hi all, Recently I started fiddling around with shaders in Game Maker Studio 1.4 and now in 2022.1.0.482. I have been developing a 3D racing game since last year (initially in Studio 1.4). I wanted to implement cube map reflections (which Game Maker doesn't fully support natively) and did kind...
  4. Heavybrush

    Shaders 1Bit Ordered Bayer Matrix Dithering

    Hi guys I’m having a problem trying to fix my 1bit ordered dithering shader // Ordered dithering aka Bayer matrix dithering varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec2 resolution; uniform float pixelSize; uniform float gamma; uniform float contrast; uniform int invert...
  5. stardust9000

    SOLVED Shaders: How to Modify Color Variable(s) from Outside of Shader--Uniforms?

    Hi, am I able to change the value of a color from outside of the shader, as with resolution and time below? //Draw GUI Event: shader_set(shaderType); shaderResolution = shader_get_uniform(shader_current(), "iResolution"); shaderTime = shader_get_uniform(shader_current()...
  6. Heavybrush

    Shaders GLSL 1Bit Dithering Shader work perfectly in all the shader editors but not compile properly in gms

    Hi guys I'm getting into the shaders, I love them but I'm not so good to understand what is going on varying vec2 v_vTexcoord; varying vec4 v_vColour; uniform vec2 resolution; uniform float pixelSize; uniform float gamma; void main() { vec2 uv = gl_FragCoord.xy / resolution.xy; float...
  7. 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 =...
  8. 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...
  9. E

    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...
  10. MilkMan5x

    Demo Shader-based procedurally rendered fire effect

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

    Understanding GLSL Shaders

    [Error]
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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: https://opengameart.org/users/buch Test situation: The view is smaller than the room and follows the player object. I want to draw everything in the game...
  18. 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?
  19. 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...
  20. 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...
Top