blend mode

  1. GonerBits

    SOLVED Is it possible to set the blend mode of a tile layer?

    In my game, I'd like to have an effect where there's a forest and there are gaps in the canopy that lets light fall through the leaves. It would help immensely if I could just create a tile layer that uses the "add" blend mode to light up the floor. Here is an example using a tileset that I...
  2. J

    I'm facing a problem with subtractive blendmode on surfaces

    I'm trying to draw a surface to simulate a day and night cycle. I've tried a few different tutorials but for some reason the same problem always comes up. I'm trying to basically punch out a light ring around certain objects using gpu_set_blendmode(bm_subtract) but I can't actually get it to...
  3. TheCheeseMaster

    GMS 2 [Solved] Trying to obscure lights in a top-down game (i.e. lights that appear to have depth)

    Hi everyone, I'm working on a top down perspective game that has a day/night cycle. I've got some lights in the game, and am using the blendmode bm_add when drawing them on the night sky surface (night_cycle_surf). After the lights are drawn, the surface is drawn over the player's view and all...
  4. M

    GMS 2 Why is my additive lighting creating darker areas?

    So I am working on an additive lighting system similar to many of the online tutorials. I am having one major issue. Where the lights overlap, I am actually getting areas that appear to be darker, not lighter. After reading the YoYo Games blog post about blend modes, I thought bm_add could only...
  5. M

    GMS 2 Alpha issues with gpu_set_blendmode_sepalpha?

    Alright can someone tell me what I am missing here? I have a surface being draw to the application surface. The surface being drawn is cleared black with a .5 alpha. If I draw this surface without blend modes the black region looks as it should. Basically it darkens the screen a little. Now...
  6. Mookal

    Need Help with Creating a Spotlight Effect

    I’d like to have a short level intro where a spotlight is on the player, and then expands outward to reveal the rest of the screen. It should be a circle drawn at the player’s position with the rest of the screen being black. I know the solution to this somehow involves Blend Modes, but I...
  7. William Garrison

    GMS 2 Set Blendmode for layers?

    Hey friends. Okay so here is what I am after. I know how to set the blendmode of a specific object using the below code. But I want to, and am trying to, apply the same "Add" blendmode to a specific Tiled Layer or the sprite asset itself. Whichever works. Here is what I tried with zero positive...
  8. P

    Trying to Easily Lighten or Darken my screen

    Hi everyone, I'm trying to find a simple way to lighten or darken my screen. It's for my basic night/day cycle. I have the shadows taken care of via some tutorials etc, and I have a sun that pans across the screen, but I haven't figured out a decent way to get the desired effect of brightening...
  9. C

    Legacy GM Sprite blank space causes border in blendmode

    I do a lot of research at blendmode and shader these days, and I'm very glad to solve many problems, but there's a thing still not work fine. If a mask is not full of image(I mean there's some empty space around it), then I will get some image with border finally, and the border is just same as...
  10. Admiral Nemo

    GMS 2 Would like some assistance with basic shading

    I would like to figure out how to create this super basic shading function for objects in my game. The sun will always be at the center of the map so getting a sprite to spawn on my ship isn't that hard, however, I've having some trouble trying to figure out how I could keep the mask and the...
  11. Strobosaur

    Blood surface only drawing on top of ground tiles? [SOLVED]

    I bet this has been asked before, but i was unable to find a good answer after some searching, so here goes: Im making a top down game, and i use a ds_grid for the map structure, then i map collidable tiles to another ds_grid and use that as a collision grid. Im also drawing all blood to a...
  12. S

    [SOLVED] Subtract Blend Mode

    I'm working on an improved lighting system in my game. Footage: https://gph.is/2LcYwii It looks good, I think, but I want a gradient circle. I used draw_circle_colour with both black and white, and I set the blend mode to subtract, thinking this would subtract a gradient circle from the black...
  13. Zack

    GMS 2 Creating a vibrant sunburst (radial pinwheel) effect

    GM Version: GameMaker Studio 2 (GameMaker Studio 1.4 with slight code modification addressed) Target Platform: All Download: https://github.com/zbanack/TSE-sunburst/archive/master.zip Summary: I walk you through all the steps of creating a stunning sunburst (radial pinwheel) effect in...
  14. N

    Legacy GM Blend Modes

    Heyall, quick question, I used in the draw event this code: draw_set_color(c_black); draw_rectangle(0,0,room_width,room_height,false) draw_set_blend_mode(bm_subtract); draw_circle(room_width/2,room_height/2,200,false) draw_set_blend_mode(bm_normal); I used draw_set_blend_mode(bm_subtract)...
  15. kamiyasi

    Legacy GM Making transparent areas opaque

    I'm using a mask sprite in combination with bm_subtract to cut a hole in my surface, allowing the background to show through. The only problem is, for whatever reason, everything drawn that has a slight transparency is also showing the background through it, even when I use...
  16. A

    Legacy GM Making surface pixels smoothly to fade to transparency [SOLVED]

    I'm trying to achieve an effect where a surface gradually fades to complete transparency. I've tried lots of methods to do this, but because of how blending works, especially on surfaces with alphas that aren't 1, I'm having trouble getting complete transparency. (I can't just draw the entire...
  17. D

    GMS 2 [SOLVED] alpha blending issues

    I have a game in which the player can essentially draw a line by dragging an object around. The line (made with draw_line_width()) is somewhat transparent and that's where the issue comes in. If the player draws back over the line it adds the alpha of the old line and the new line together. I...
  18. Y

    Question - IDE gpu_set_blendmode_ext_sepalpha() broken ?

    No successful results with gpu_set_blendmode_ext_sepalpha() to set a different alpha blend mode. Does not produce visible changes on my side. var1, var2, var3 and var4 = one of the 11 blend modes (for example "bm_one") only when changing var1 and var2 produce visible results my sprite...
  19. Y

    Question - IDE [Answered] bug with bm_complex

    Trying to figure out what this mode is : bm_complex I know it deals with blend modes, but this one is not documented at all. Here are all the others linked with gpu_set_blendmode : bm_normal Normal blending (the default blend mode). (bm_src_alpha, bm_inv_src_alpha) bm_add Additive blending...
  20. G

    GMS 2 [SOLVED] change color of tiles like tile_set_blend()

    in my project i have a piece of code that relys on obsolete compat functions when imported into GMS2 var tile = tile_layer_find(1000000, x, y); if(tile != -1 && tile_get_blend(tile) != -1) { tile_set_blend(tile, blood_type); } this is called when a creature is bleeding, and all it is...
Top