shaders

  1. c023-DeV

    Shaders [SOLVED] Shaders: Post Processing, Multiple passes?

    How do you handle multiple post processing shader passes? Can I do multiple passes of the application surface within one shader? Or how can I pass a surface that has be processed by one shader to another shader? Thanks!
  2. Erayd

    Android Shader Syntax Error

    I'm getting a syntax error at line 20 in my fragment shader and I'm unclear as to what is wrong. Line 20 is the one that is: color2 = vec3(texture2D(colorMap, vec2(1.0, i/mapHeight)) The general goal of this shader is to compare the colors of a sprite in an object with the colors in a vertical...
  3. W

    Vertex shader help with scaling

    I'm doing a lot of guesswork here as I'm new to shaders. In the vertex tab, I've noticed if I multiply "in_Position.x * 0.98" I can offset the shader to the left, which is interesting, but not what I need! void main() { gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * (...
  4. W

    GML Applying shader before game scales

    I've made a shader for rendering slopes so I can use the same 16x16 wall tiles on slopes (without having to make individual slope sprites at various sizes). The game then adds grass to the top of slopes. The first room is set to 1920x1080 and the game size itself is 480x270, so the game scales...
  5. C

    Shaders Problem with shader not applying to GUI layer

    I am having an issue where I've managed to get this CRT filtered shader to work but it won't apply itself over my GUI layer. When I don't set its depth low it draws over the GUI layer and the GUI layer is gone. When I do set the depth low it appears behind the GUI layer and in front of...
  6. jf_knight

    Legacy GM Only one shader appearing

    I'm trying to use two shaders on the applications surface. My problem is that only one of them, "sh_saturation_new", appears to be working. What can I do to make them both work? Here is what I have on a "Draw GUI END"; shader_set(shader2); surface_set_target(application_surface); //Set the...
  7. ShaunJS

    Graphics Pixel Outline Shader Tutorial

    GM Version: GameMaker Studio 1.x & 2 onwards Target Platform: All Download: N/A Links: N/A Summary: Create a simple pixel outline around a sprite using a shader. This shader simply raises the alpha of a pixel based on the pixels that surround it in the original texture. Can be made to work with...
  8. K

    Problem With Inverting the Colours

    I am having problems with the main menu, or, rather, the fancy effect I wanted to implement. I made a shader that inverts the color of a pixel. I think the shader itself is legit. varying vec2 v_vTexcoord; varying vec4 v_vColour; void main() { vec4 oc = texture2D( gm_BaseTexture...
  9. jf_knight

    Shaders Using two shaders at once

    Anybody know where I can find a tutorial on using multiple "whole-screen" shaders? (As in, stacked on one another) I know that surfaces are involved but I just don't know where to begin. I'm trying to combine a hue shader and a brightness shader so they can both be used at once...
  10. Arconious

    Shaders Outline Shader w/o Separate Texture Pages

    (I am using GameMaker Studio 2) Hello all, I'm currently trying to learn about Shaders and how to use/construct them, and as part of that I have been trying to piece together a simple outline shader. The code I've managed to get together almost works perfectly, however the outermost pieces...
  11. D

    Legacy GM How to use multiple shaders with passthrough?

    Hello again, new problem ^^" Since my godrays shader is working, I want to use multiple shaders. The first shader will render the godrays and the second shader will do some processing stuff like vignette. Now my question is, how do I use multiple shaders at once? Like how do I render my...
  12. Momfus

    Legacy GM [Shaders] Circle Area *SOLVED*

    Hi, I'm new in the use of shaders and i tried to make a shader on a sprite that make all the area inside a circle (center in the middle of the sprite) with a gray color and nothing outside of that circle. I have a object ob_planet with a 300x300 sprite (is just a circle with different colors)...
  13. Rackover

    Shaders Looking for a Multiply Shader

    Hi, The artist i'm working with applied a cool effect on his photoshop mockup using a layer set with the blend mode "Multiply". As I already managed to create an Overlay blend mode shader, I'm looking forward to have a multiply one as well ; problem is, finding good documentation about it seems...
  14. D

    GML Shader that outlines sprite and shader that changes sprite color

    I've watched Shaun Spaulding's video on shaders, but when applying the code to my program it didn't work. Is there another tutorial out there that show's how to outline a sprite using a shader? As for the second shader, I know image_blend could be used to change a sprites color, but it doesn't...
  15. Ricardo

    Job Offer - General [SOLVED] Looking for a alpha gradient shader

    Hi there, I need a shader to apply an alpha gradient into a sprite. With gradient I mean: alpha will be 1 (100%) in a determined point/corner of the sprite that I'll select, and then it'll fading out into the direction/angle I choose. The shader needs to be able to deal with custom...
  16. Ricardo

    Shaders Sprite alpha gradient

    Hi there, I'm trying to code a shader to apply an alpha gradient into a sprite. With gradient I mean: alpha will be 1 (100%) in a determined point/corner of the sprite that I'll select, and then it'll fading out into the direction/angle I choose. I already found a simple shader that almost do...
  17. S

    GMS 2 Vertex Buffer not showing up

    The following code is supposed to draw a tiled floor, leaving out spaces for holes. However, it's not appearing. I have created a shader, and left the code as what was automatically created. I'm not sure if I have to draw this anywhere else in code, or whether vertex_submit takes care of that...
  18. H

    Shaders [SOLVED] Is this where I use vertex buffers?

    I'm messing around with the FBX SDK and I was just wondering how I was supposed to render the models. My assumption is that it will be rendered by a shader and the documentation for GMS mentions that vertex buffers are used for this. So is the basic idea that I just fill the vertex buffer with...
  19. R

    I experiment with shaders, I think my code is correct but it actually isn't?

    CREATE EVENT ///Get Shader Uniforms //distortion effect shader u_resolution_water = shader_get_uniform(sh_underwater, "iResolution"); u_seconds_water = shader_get_uniform(sh_underwater, "iGlobalTime"); texture_counter = background_get_texture(background1); sampler_counter =...
  20. TotallyAverageGamez

    Copying a portion of a tilemap? draw_tilemap_ext?

    I would like to copy part of a tilemap to a surface so I can pass it to a shader. The problem is that there only seems to be one function for drawing / copying a tilemap; the draw_tilemap() function, which draws the entire thing (requiring the target surface be the size of the room, which is...
Top