• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

shaders

  1. Coded Games

    Shaders Shader to create an outline around a primitive.

    So my game uses a lot of primitive shapes that are draw every frame because they animate and change shape constantly. This animation has been the main reason I have not used vertex buffers as it seems like I can't really resize a shape after creating the buffer. A lot of these shapes have...
  2. P

    GMS 2 Please, help optimizing my shader

    I have recently posted a thread where I had asked to help me making one shader, now I guess I have understood how to make it, but as I am very poor at Shading Language(GLSL if I am not mistaken), I really have troubles with syntax, so here is the working shader code and I will aslo attach the...
  3. P

    GMS 2 Shader for the entity cursor

    Hello everybody, I apologize to the forum stuff for my previos post, but I need help again. Fortunately this time it's much much more constructive: I just ahve no idea how to make good shader. I mean I know how to use and write them, but I don't know how to make the content of the shader this...
  4. witches

    SOLVED Dynamic Outline Shader from Surface

    Hey all. So I'm working on an outline method where I sample a surface texture of a couple of sprites and send that through a basic outline shader and basically clear and repeat. So far it works well, but there's a tiny outline of my sprites being created even when they're both being drawn onto...
  5. _ttu

    Windows Shaders don't compile

    Hi, I've run into a strange issue with my project, created with GMS 1.4: some Windows 10 Pro 64 bit PCs can't compile GLSL ES/HLSL 9 shaders. First I check shaders_are_supported() and get 'true' as a response on both PCs. Then I do shader_is_compiled() for both shaders (GLSL ES and HLSL 9)...
  6. Slothagami

    SOLVED Custom Shadow Color?

    I have been battling with the shadows in my games for quite a while now and can't seem to do this myself, I want to have shadows for each object, in the shape of their object, and using a different color based on the color behind the shadow (to fit with the color palette) I am very new to...
  7. P

    Team Request Artist with Shader Knowledge Needed

    Hello GameMakers, I am a programmer in the small team of 2 soundmakers artist and me. Together we are developing game called "The Bottom". As I don't want to make this post too long I will not explain all the Lore and Game World here, instead I will combine a few words with my Final Draft...
  8. L

    GMS 2 Draw failed due to invalid input layout

    Re-Edited post to get to the point. Gamemaker Studio 2 IDE version: v2.2.5.481 Runtime Version: v2.2.5.378 Platform: Windows This script below, I believe interferes with ANY shader when used together(could be due to old code - minor alterations from this script: Click Here) I've narrowed it...
  9. Jochum

    GML Show sprite on collision only (Shader?)

    Hey everyone, I'm trying to show a sprite on the place that it collides only. This way I can create a type of shadow from one planet on top of the planets underneath: The shadow is created by showing the same sprite, making it black and lowering the alpha. Screenshot: Hopefully, someone...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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
  17. 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...
  18. 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...
  19. 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...
  20. 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...
Top