shaders

  1. Azenris

    Shaders [Solved] Uniform arrays

    I not understanding uniform arrays. I want to have in my shader struct light { vec2 position; float radius; vec3 colour; }; uniform light u_lights[2]; uniform int u_lights_count; I tried to do var temp1 = shader_get_uniform( metaball_lighting_shader, "u_lights" ); var...
  2. M

    Saturation Shader [SOLVED]

    I have a de-saturation shader that works on instances. I want to draw the same shader over the floor to cover the floor tiles. I only want the shader to cover the walls and the floor, so drawing on the application surface is out. I've tried using surfaces but no luck. Any ideas on how to go...
  3. lost

    Free For GML writers: GML Pro Library, Supporting GMS 1.4 and 2.3+ - 100s of shaders and scripts for FREE

    https://github.com/h3rb/gml-pro https://marketplace.yoyogames.com/assets/1780/gml-pro-pack gml-pro A large collection of shaders, images and utility functions for GameMaker Studio 1.2+ All shaders written for OpenGL GLSL ES IF YOU DOWNLOAD THIS PLEASE STAR THE PROJECT ON GITHUB, THANKS! How...
  4. S

    Is there a way to remove vertex_position_3d() from a buffer?

    I'm using vertex buffers to draw grass sprites around the room, and I want to be able to remove triangle positions for specific grass sprites, effectively removing specific grass sprites form the room. This data is held in a "vertex_buffer" so I'm trying to find a way around removing vertex...
  5. S

    SOLVED Can shaders affect an instance's x and y? (instance_place and instance_destroy not working)

    Solution is in my final response to this thread. I''m working with this Wind Grass shader: https://marketplace.yoyogames.com/assets/6030/depth-based-grass-with-wind GMS2.3.1 I had another thread about this asset although this time a different issue. It seem the x and y of each instance...
  6. A

    How do I get shaders to appear in every room my sprite is in?

    Hello everyone, I recently figured out how to implement dynamic lighting in my game. I followed a tutorial and the lights appear to be working fine in one room, but don't appear at all in the others. How can I fix this? Here is a video demonstrating my issue:
  7. Son-Benji

    Shaders Why is my color swap shader not working anymore since import?

    Hi, can someone please give me a little assistance? I’ve made a game with gamemaker 1.4, and had to convert the file to be compatible with gamemaker studio 2 (for mobile release). I have colour swap shaders that worked perfectly before, but now they give me this effect/result. What is it...
  8. Son-Benji

    Question - Code Shaders not working correctly after import from 1.4

    Hi, can someone please give me a little assistance? I’ve made a game with gamemaker 1.4, and had to convert the file to be compatible with gamemaker studio 2 (for mobile release). I have colour swap shaders that worked perfectly before, but now they give me this effect/result. What is it...
  9. 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...
  10. P

    GameMaker 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...
  11. P

    GameMaker 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...
  12. 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...
  13. T

    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)...
  14. S

    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...
  15. 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...
  16. L

    GameMaker 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...
  17. J

    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...
  18. P

    GameMaker 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...
  19. 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...
  20. 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...
Top