1. N

    HTML5 build: Fragment shader compilation problem on Chrome

    Hello, I am currently trying to do some performance tests with HTML5, so I have made a very minimalist project that includes: - 0 sprite - 2 objects which draw text, one resizing the game window to somehow fit the browser size - 1 room with a black background and one instance of each objects...
  2. BELLER Lab

    GMS 2 Android Devices shader surface_copy problem

    Hi ! I'm trying to use a black hole shader that I found online (Made by flyingsaucerinvasion) on Android Device, the shader code is pretty simple (I just modified it to do a simple Alpha Transition) but the problem come from the Draw Event of the Black Hole : if(!surface_exists(surf)) surf =...
  3. O

    SOLVED Loading a surface texture into a shader

    Hi All, I'm pretty new to shaders, and relatively new to coding (this is my first game) so this may be really simple to solve. Basically, I'm making a top down space combat game (think asteroids type movement), where one of the ships can produce a "Gravity Wave". I want this effect to be...
  4. 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...
  5. 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...
  6. 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...
  7. 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
  8. 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 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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?
  13. 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...
  14. 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() {...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...