• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!


  1. JapanGamer29

    Shaders Shader to lighten or darken a sprite?

    Hi all, I've been using image_blend to highlight puzzle pieces in my game, but it only works well with some colors, not others. I have a grayscale shader which I found here ages ago, and I'm able to change the values so that it lightens or darkens, but I can't figure out how to remove the...
  2. Carloskhard

    GMS 2 Can't use shader inside surface

    So is this something related to GML? I have a surface that I can draw with a shader, but if I draw that surface inside another surface, the shader doesn't apply. Any insights?
  3. J

    Shader resolution problems

    I'm pretty new to shaders and have used a guide to create an entire-screen underwater wavey effect. Works perfectly both in windowed mode and 16:9 rooms in fullscreen (my monitor resolution is 16:9). But on rooms that are in 4:3, rather than give me my black bars on either side in fullscreen...
  4. mbeytekin

    Texture2DLod doesn't work in vertex shader?

    I can't get any colors from texture2dLod in vertex shader? How we use texture2dLod function in GameMaker? My example code like that in vertex shader; attribute vec3 in_Position; varying vec2 fragCoord; varying vec4 Colour; uniform vec3 iResolution; uniform sampler2D tfm; void main() {...
  5. foreverisbetter

    Shaders enabling glsl es EXT_polygon_offset_clamp extension

    Hello, I've found a git repository in which someone was able to enable gl_frag_depth in a glsl es shader with #extension GL_EXT_frag_depth : require and the same person was able to do the same with #extension GL_OES_standard_derivatives : require for fwidth() And as far as I can tell it...
  6. mbeytekin

    Unclamped RGB in shaders? Possible?

    GM2 clamps rgb values (0-1) in shaders.. Is there any way to unclamp them? Because when I implement shaders from other sources like shadertoy I realized they are not clamping rgb values and rgb values can get - and + float. Yes I can normalize in a range them with very high precision floats...
  7. T

    Problem with a Color Shader

    Hey everyone, I am developing a game with only two colors that change from level to level. I'm using a shader to do so which works fine even though it is pretty simple. However, on certain computers, the shader does not work and I have no idea why. I was wondering if you could help me with it...
  8. N

    SOLVED Surface with shaders displaying blank window

    Greetings developers! Recently I was playing with surfaces and shaders and I've managed to create (by following some tutorials) a simple lighting system with some shaders. It worked perfectly on my demo project but when I tried to apply it to my main project it didnt work at all... I don't...
  9. mbeytekin

    Bitwise AND operator in shaders

    How can I calculate this in GM2 fragment shader; m[(k+4)&7] += vec4(c1 * wk, wk); s[(k+4)&7] += cc1 * wk; (k+4)&7 gives a syntax error in GM2.. I found this code from shadertoy and it works there... https://www.shadertoy.com/view/ltyyDd
  10. mbeytekin

    Cartoon Shader Idea?

    I am looking for a road map for making an image looks cartoon.. Example application is Comica for android... I've tried Line Integral Convolution method and can get some results but there is something extra for this images. Especially edges are very smooth and clear and sharp... Another...
  11. V

    Stretching the view using a shader to create a perspective/endless horizon effect.

    Hi everyone, (example) I'm using GMS 1.4 and am currently working on a 2.5d open world game. A view follows the player and the objects that come into said view from the top need to be stretched or scaled in such a way (like Mode 7). The issue is i can't seem to find any tutorials on the...
  12. brice_platinum

    GML Sprite fade transitions using surfaces

    Hello everybody, I'm trying to make a simple fade effect between two sprites and i got in to a problem. This is what I am expecting to get I created 2 sprites with the pictures and a simple background with a blue dot in the middle. Now what I want is the first image starts to fade away at the...
  13. TheOakNuggins

    Shaders How to create color dodge shader?

    Hello! I'm trying to be efficient with the way I'm making my HUD sprites. I don't want to draw each frame with the shadow, I'd rather use a solid square and move it to fill the health bar area. My idea was to use shaders to achieve the same layer effects as in my editing software (Aseprite and...
  14. Z

    SOLVED Problem with Shaders and YYC

    Heyho guys and girls, I am currently working on a voxel engine/game. Since i had some issues regarding Performance i decided to go through the hassle of installing Visual Studio to use the YYC. But when i now run the game with yyc it messes up my textures. I use a GLSL ES shader for texturing...
  15. GoK

    GMS 2 Directional Light and Shadows in 3D

    GM Version: GMS 2.2.5 Target Platform: All Download: 3D_Directional_Lighting_starter.yyz 3D_Directional_Lighting_final.yyz Links: N/A Summary Hi! In this tutorial, we will go through the process of creating directional lighting and cast shadows. Note, it's not intended for the complete...
  16. marasovec

    Help with a shader

    I'm a shader noob and I found this blur shader I'd like to use but it says there is a syntax error. Can you guys "convert" it so it's compatible with GM? uniform sampler2D image; out vec4 FragmentColor; uniform float offset[3] = float[](0.0, 1.3846153846, 3.2307692308); uniform float...
  17. Adry

    SOLVED how to get a shader to affect all, but one?

    Hi! Its been a while since I've been on here. so, hello hello! I've currently run into a problem that I'm desperate to solve.. I currently have a shader that de-saturates the screen via gui. The problem is I want one object to remain with color. how can I draw that object without it being...
  18. angelwire

    Graphics Toon and Outline Shaders

    First off, here’s a quick shout-out to the people who created the resources/tutorials that helped me out xygthop3 - https://marketplace.yoyogames.com/assets/4894/hlsl11-basic DragoniteSpam - https://www.youtube.com/user/2andaHalfStooges @Xor @Binsk -...
  19. E

    Shaders 2D Vertex (Not Sprite) Shader Translation (x,y)

    Hello, i was wondering how to translate correctly the x,y coordinates of vertex (Not sprite) in a shader... By now, i've got a working one. But doesn't work when i replace "10. 's" with a uniform float for each value... That makes me a bit angry :c . Probably a weird bug in my or every GML D...
  20. V

    Shaders bktGlitch working on Windows but not on Android

    Hi, I' ve bought bktGlitch shader yesterday and used it in my project. When compiling it to Windows everything worked just fine, but when I changed platform to Android the shader didn't work. Other shaders like Outline or FXAA were working perfectly. When I checked shader_is_compiled(), FXAA...