shaders

  1. P

    GMS 2 Draw Sprite Part Extended Need Help

    So I am not very familiar with shaders but I have watched and read most neccesary tutorials to understand how they work. I need my shader for drawing laser weapon aim. The laser weapon needs to be charged before shooting, this is why I want my aim to show the current charge by filling the inside...
  2. D

    How to use shaders to make parts of an object transparent based upon contact with another object?

    I am trying to make a game in GameMaker 2 where objects become transparent depending on the object behind them. I currently have it so I am just checking each step (within the object to become transparent) whether in contact with the background object and then setting alpha to 0.5 if true. Here...
  3. U

    Question - IDE chancing the order of shaders in resource tree affects in-game application of them

    I've 8 shaders in my project so far, used to have 2 more that I wasnt using anymore so I deleted them, on the next compile, rendering was messed up. it's a 3d project and I'm using couple of surfaces as FBO's and I've bind some keys to save them for me. I've the file they're saved in open in my...
  4. S

    SOLVED How to change the colour of an outline shader?

    I've followed Shaun Spalding's tutorial at youtube[dot]com/watch?v=zWrpHbc6fmc, which basically sets up a one-pixel outline for sprites using shaders. Currently, the outline is black. How do I change this? I've tried messing with gl_FragColor but it either messes up the transparency (no longer...
  5. J

    GMS 2 Getting texture data in vertex shader?

    I recently purchased GM:S 2 with plans to make a 2d-3d hybrid game for Windows. For the 3d portion I would need high-performance 3D dynamic height maps as I'd like to maximize rendering speed. Rendering a static heightmap is no issue for me, but I want it dynamic. I experimented with shaders...
  6. N

    GMS 2 Please Help Light up Certain Areas in the Room

    Hi, I have found tutorials for lighting up a certain object, to make the room around them darker and a small area around an object brighter, but I can't find anything regarding areas of the room, like coordinates. My goal is to have a lighting system like Enter the Gungeon, where if the player...
  7. Archdemon

    Shaders and Surfaces quick question

    So I am making a little platformer with my nephew (trying to get him into programming; he seems to have a liking for it.) And I am using shaders and surfaces within a single room at the moment, but I am noticing that the shader seems to also affect the surface making for some let's just say...
  8. TheOakNuggins

    GMS 2 [help] Create enchant FX similar to minecraft

    I have this bow sprite and I want to make it look like the enchanted tools in minecraft. I have no idea how to go about this with shaders. Desired effect: https://gph.is/1w1s1of
  9. gengo

    [Tool] Protect your shaders

    Download: https://github.com/GengoStar/HideGMShaders/releases Github: https://github.com/GengoStar/HideGMShaders Versions: GM:S2 Maybe youve already heard of this, but GM:S2 stores your shaders in plain text inside win files, making them easy to extract for anyone interested Turns out that the...
  10. E.M.I

    Shaders Cannot pass in uniform values to shaders

    [RESOLVED] Hi! I'm trying to create a day-night cycle for my game. I plan to do this by using a shader to change the color of a transparent sprite that stretches across the whole room. Though for now, I'm only trying to pass in a uniform value that I'll use for the color. My code is: In the...
  11. Tyler D. Anderson

    Shaders Why does GMS2 leave the shader code exposed in the final export?

    If I have an empty project with a simple shader: // // Simple passthrough fragment shader // varying vec2 v_vTexcoord; varying vec4 v_vColour; void main() { float two = 2.; gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord ) * two; } And I then compile it to a zip - I...
  12. Divinik

    Shaders Only Draw Unobstructed Part Of Sprite?

    I have a vision cone sprite that enemies use to signify their field of view. I'm trying to figure out how to make it so that when a part of the sprite is overlapping with another sprite, that part is not drawn. Basically like a spotlight, where the light would stop where a solid object is. Any...
  13. Azenris

    GMS 2 Lighting

    Hi I am having problems with my lighting ( still ;_; ) I kinda thought It was working ok, but looking closer I can see problems. This link shows the surface_light https://imgur.com/a/7i020P0 However as you can see. There are these weird black lines that intrude on the light. Ignore the...
  14. Freddie The Potato

    Shaders Using samplerCube in GMS2

    Heya SamplerCubes are a GLSL feature that allows you to group 6 2D textures together to form a cube (1 texture for each face). You can then use GLSL's textureCube function with a directional vector to grab a color from inside the cube. Usually in order to use the textureCube function, the user...
  15. M

    Shaders Shaders and Surfaces. Matching wrong colors?

    I am using the below shader to try and put transparency on the shadows in my room. There are two main problems with it that I cannot figure out. So what I am doing is drawing all instances to one surface, then drawing the light mask on another. Then I draw the light mask on top of the...
  16. C

    Shaders GMS2 shader not working. Please help.

    I just started playing with shaders and even though my code is exactly like the simple tutorials I'm following, nothing seems to change when I run the program. I have no idea what I'm doing wrong. Any advice would be a great help. Here's the fragment shader's code: varying vec2 v_vTexcoord...
  17. Desix

    Shaders [Solved] Applying shader to coloured vertex buffer

    Hi there. I'm sure this one's simple to those experienced with shaders and buffers. The goal itself IS simple to explain. I need to apply a fade shader I have (or create a new one to perform the same function) to a plain colour/alpha un-textured vertex buffer. I'm not that great with either...
  18. A

    Shaders Uniforms not setting correctly.

    Problem: I'm trying to set certain color values for some shaders within my planet objects but for some odd reason multiple colors are just getting set to black despite the value being passed in being the correct value. I've got a bunch of color values set up as globals and I'm storing them in...
  19. BCrash

    Windows Anura 3D (PBR 3D Engine)

    I started working on this project as a little 3D shader experiment back in 2015 (GMS 1.4), to see how far I can go. Right after implementing a traditional per-pixel lighting system I started replacing it by PBR (Physically Based Rendering) to achieve more realistic graphics. In 2017 after...
  20. jms

    Demo BBBEATS Music video software Beta version 2

    I have created a system for creating music videos or cutscreens etc using just Game Maker 2 It is called BBBeats and it has following: BBBeats v2.0 Beta - calculate BPM (Bpm beats per minute) for a sound, creating then signals for every position of the song. - Shader controller that gets...
Top