1. 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:
  2. gengo

    [Tool] Protect your shaders

    Download: Github: 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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 However as you can see. There are these weird black lines that intrude on the light. Ignore the...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. Gun_Goose

    Shaders getting a pixels location in a shader

    Hi, I am trying to write a shader in which I pass it a point and a radius, and the shader fades objects to black the farther you get from the point. I am having a little trouble understanding how to compare this location to every pixel on the screen. (i am working in 3d, so I would like to try...
  15. E

    Shader - replace one color.

    I'm having a difficult time understanding shaders. I've seen numerous video tutorials online and example code, but still feel lost. Here's what I know thus far: My_Shader.vsh is untouched. The following is written under My_Shader.fsh: varying vec2 v_vTexcoord; varying vec4 v_vColour; void...
  16. Divinik

    Shaders White fill shader that gradually increases opacity?

    Basically when the game initiates battle mode, I want all involved actors to fill white, and then swap to their battle mode objects. I just don't know how to change the alpha of the shader from gml, or how to set up the shader to allow me to get the alpha variable from the shader. Any help?
  17. S

    (shaders) shader_get_uniform always returns -1

    I'm trying to write a shader to swap one color for another, but shader_get_uniform won't work, so I can't edit the data in the shader. the fragment shader the vertex shader: and the code that calls shader_get_uniform:
  18. Apapappa

    Windows RenderTech

    Description: This is a little side thing I work on sometimes, mostly when I want to relax a bit. I'm making this to prepare a "framework" which I can use whenever I decide to actually make one of the 3D games I have planned. It is definitely not perfect and has a lot of errors and what not but...
  19. Sidartha

    Shaders Having trouble applying Vignette shader and distortion on screen

    Sorry folks, I`m still a rookie on Game Maker and despite of watching some tutorials I couldn`t apply a distortion shader with a vignette shader on the whole game screen. I`ve created two shaders: One named "sh_underwater" and the other named "shd_vignette_noise"...
  20. I

    Legacy GM Texture Sampling question

    I turned off the setting "Interpolate colors between pixels", I would hope this means texture resolution wont impact the speed of texture sampling in the fragment shader since it would just use the color it finds at the texture coordinates, not caring about neighboring colors. Just wondering if...