shaders

  1. jujubs

    Confused by surfaces and shaders

    So I'm making a game designed to look like it (kinda) runs on the Game Boy. So far, I was making it in black, white, dark grey and light grey, but I tried a shader to turn those colors into shades of green and it looked amazing (or, at least, people I've showed it to seem to think so). The...
  2. Fanatrick

     Rising Sun Academy [Online ActionRPG] [LF Testers for feedback round]

    (work in progress, features and elements will change) Info: Gameplay: Movement/Swordplay [/B] Combat is heavily focused on timing, strategy and reflexes You can block most attacks and projectiles. Blocking too much force results in a guard-break Guard-breaking knocks the enemy in a...
  3. jujubs

    Shaders Mysterious syntax error

    So I followed this tutorial right here to learn how to change my sprites' colors using shaders: It all seemed simple enough, and indeed, I managed to add some color to my game sprites without much hassle. However, the method used in the video also changes how transparency behaves. My player...
  4. Turkish Coffee

    Legacy GM Trying to create a surface under the application surface

    Hey, I'm new to surfaces and I'm trying to have a shader draw on a surface thats under the application surface so I can put objects in front of the shaderized object. (If you wonder, its the TrueWater2D from xygthop3 which I can't find in the marketplace anymore) How can I achieve that? I ask...
  5. D

    Shaders [SOLVED] Shader not working on iOS

    I'm trying to use this bloom shader for my iOS game: https://marketplace.yoyogames.com/assets/4729/simple-bloom-shader It seems to work alright when I test it from the IDE, but it doesn't seem to have any effect at all when I run it on my iPhone. What could be the problem? Xcode shows a few...
  6. Y

    Shader Lagging [Solved]

    Hi evryone, i have this simple shader: // // Simple passthrough vertex shader // attribute vec3 in_Position; // (x,y,z) //attribute vec3 in_Normal; // (x,y,z) unused in this shader. attribute vec4 in_Colour; // (r,g,b,a) attribute vec2...
  7. MartinK12

    Shaders [SOLVED] How to convert 3 digits RGB to 1 digit RGB in shaders ?

    I'm trying to learn more about shaders and created this simple one in .fsh tab in shaders to replace specific color in sprite with different color: if ((gl_FragColor.r == 1.0) && (gl_FragColor.g == 1.0) && (gl_FragColor.b == 1.0)) { gl_FragColor.r = 0.9; gl_FragColor.g = 0.6...
  8. K

    Shaders [Solved] Arrays and Shaders

    So, ideally I would love to have a uniform vec2 array, but I don't know if that's possible and I can't even get a uniform float array to work. I'm using shader_set_uniform_f_array() for the first time and in the yoyo doc it doesn't say how you write it in the shader. I found an example online...
  9. K

    GMS 2 [Solved] Applying a shader to tiles

    I've made a shader that requires uniform variables. It works great with objects, and I can get it to work on tiles without uniform variables using layer_shader(), but i can't for the life of me get it to apply to tiles with uniform variables. I tried to use layer_script_begin(), but found out...
  10. L

    Help with coloured dynamic shadow shader

    I have recently been trying to implement a dynamic shadow shader into my projects. I have found this which video which shows off his shader code but honestly I need some help working it into my projects. If someone could help me here that would be great, thanks in advance.
  11. MirthCastle

    GML MoonLighter Night Cycle (Tech Talk) (Help)

    Hey All, I have been trying to recreate the MoonLighter night cycle in GMS - I think I am CLOSE - but not quite there... I'm missing something i can't put my finger on... My goal is to have a dynamic day-night cycle - where the nighttime ends up looking like Moonlighter. Please See...
  12. Kaliam

    Question - Code No textureSize() funtion in GMS2 GLSL Shaders?

    The title says it all, I'm just curious why this method doesn't exist in GMS2 since it's been in GLSL since version 1.30. It doesn't make a difference if you're using GLSL or GLSL ES, although the type of compilation error you get is different. Just curious, didn't want to have to pass in all...
  13. 3

    Shaders How Much Can the GPU Handle in 3 Dimensions?

    Relatively quick question, in the process of drawing 3d models i normally, map out a .obj file to their corresponding; v (x,y,z) , vt (u,v,w) , vn (i,j,k); vertex position in 3d space ,xyz, vertex texture in 2d space with w for mapping ,uvw, and vertex normal for lighting ,ijk,. I've gotten...
  14. T

    Shaders [solved]lerping image blend shader

    Hi. I have been doing morphing between image blend colours like this example below, and was hoping someone could show me if there's a way to do this with shaders in a more straightforward manner :) I know there are examples of shaders within the GMS demo' but I couldn't understand how they...
  15. G

    Legacy GM Applying High Res Texture - Pixel Art

    I have a view resolution of 240x135 and a view port of 1920x1080. This means that the graphics are actually displayed at the higher resolution. When I draw a texture on top of the game window with the GUI layer using a subtract blend mode, I get this nice looking effect where the graphics look...
  16. Y

    Shaders How to/ is it possible to temporarily apply a shader to an object through a with statement?

    So I have a cursor object and when it hovers over any object that is a child of "selectable" I want the object to have a outline around it. The way I would like to accomplish this is through a with statement located in the cursor object that applies a shader to the object it is hovering over...
  17. Erayd

    Shaders Creating a window to the player's location

    Here's the issue: In a pseudo 3D game (Zelda/golden sun), when a player walks in front of a tall building or cliff, the player then becomes invisible to the player. I want to find a way to communicate to the player in a fluid way, where the player is and what might be behind that wall when the...
  18. cidwel

    Shaders Desaturate overtime shader

    Hello! I'm trying to find a good shader that will let me convert any sprite into greyscale over a time variable. Right now I have this: void main( void ) { vec3 color = vec3(1,0,0); vec3 c1 = color; float compRMax = 0.3; float compGMax = 0.59; float compBMax =...
  19. Ggd07

    GMS 2 [SOLVED] Using surfaces with alpha correctly

    Hello, I have been trying to fix this for weeks now, and due to my limited understanding with blending and shaders I am not able to do so. I've read countless threads on reddit and on the forums but was not able to fix this. Basically, the problem is this: What I am doing exactly, is having...
  20. R

    Shaders Question about Texture Coordinates

    Hi, I'm trying to make a shader where I need to get some RGB values from a texture input from a surface (actually it's an output of another shader) I tried something like this: varying vec4 v_vColour; varying vec2 v_vTexcoord; uniform sampler2D Texture; // The 'texture surface' // This is...
Top