• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

shader

  1. GoldenLeaf

    GMS 2 Newbie Needs Helping Drawing Shapes with Shaders

    So real quick, this is my first post on here and my first attempt at a project, so I apologize in advance if this has been covered before, if this is in the wrong section, if there is some formatting or other nuances I get incorrect, or if I just flat out sound dumb, lol. Noob trying to learn...
  2. M

    Tilt Shift Shader

    Hi guys! I would like that things in my game look very small (miniature). The effect (shader) i'm looking for is called "tilt shift". With a simple blur-gradient things look like miniature (at the very top of the image a strong blur... with increasing y coordinates less blur.... in the middle...
  3. JeanSwamp

    Apply Shader to everything within a sprite_width && sprite_height area

    Hello, I am trying to make some underwater effect in a sidescrolling game. Applying a fullscreen shader to create an underwater effect is pretty easy, but when you have in the same screen both water and terrain, this might get tricky. Basically I need to apply the shader to everything that the...
  4. S

    Apply shader on specific layer or object?

    Hey i'd like to know how to apply shaders only on specific layers or objects. Thanks for the help! :D
  5. NeZvers

    SpritePalettizer - free html5 tool for color changing pixel art assets

    SpritePalettizer is a free html5 tool and 2$ for a desktop app (Win/ Linux/ Mac). Get it https://nezvers.itch.io/spritepalettizer. I've included GameMaker:studio2 shader code example and example project (provided by Xordev on twitter) on how to use color swapping with color set textures (not...
  6. E

    3D Texturing cubes with Multiple Textures?

    I'm working on a game right now that I want to be a simple 3D platformer, using cubes/prisms made from vertex buffers for the terrain. My problem is the way I want to texture the terrain differs based on how the terrain is shaped. Something like this below: I understand I might not be able...
  7. Suzaku

    GMS 2 Black silhouette when using shader

    Well this is my first time trying to use shaders, so basically I went to yoyo marketplace and downloaded a shader for example(in this case im using a shader that creates scanlines on the screen). I imported only the shader files(I hope this is ok), and went to my draw event in a test object, and...
  8. 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...
  9. 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?
  10. 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...
  11. 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() {...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Top