uniform

  1. Finbox Entertainment

    Shaders [SOLVED] Shader uniform not passing the values to the shader on Android device

    Hello, I have the following code on my main object which draws the sprites. ####################### DRAW EVENT OF MAIN OBJECT ######################### shader_set(shd_colorchange); shader_set_uniform_f(shader_get_uniform(shd_colorchange, "u_v4_wantedColor"), 1.0, 0.0, 1.0)...
  2. 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...
  3. Azenris

    GMS 2 Update shader uniform for particle system

    I have custom shader, with some uniform variables. I need to set those variables for the particle system. I created scripts for layers that contained particle systems. I disabled automatic drawing of particle system. part_system_automatic_draw( _particle_system, false )...
  4. Kaliam

    How to pass a vec4 array to a shader? (GLSL)

    Hello, I'm just trying to use a shader uniform that is declared as such: uniform vec4 lightMap[32]; This compiles just fine in GLSL, however, there isn't a GMS2 function that is specifically for a vec4. I've tried using a float array of arrays that represent the vec4's in an array but can't...
  5. Azenris

    Legacy GM [Solved] Shader Uniform Not Setting

    Hi ! I have a problem I'm not understanding. Am I allowed to change a uniform more than once ? ATM i have the following code. var from; var to; var horizontal = false; from[0] = bloom_surface; to[0] = blurred_bloom_surface; from[1] = blurred_bloom_surface...
  6. Misu

    Shaders int uniform is not comparing correctly

    Im not sure if this is a newb question but this dilemma is something I cant define at all within my experience. All am I doing is comparing two different int uniforms to perform a colour transition effect but it looks like the if statement returns true always when it is not suppose to...
  7. T

    Shader pass in variables in for loops

    Hi all, I'm working on shaders, specifically for a simple blur effect. I am passing in a variable u_Blur to the shader, so that if I get hit or something, the screen blurs for a bit and gradually goes back down. here's the code in my fragment: varying vec2 v_vTexcoord; varying vec4 v_vColour...
  8. Heavybrush

    How to change this shader to swap the palette

    Hi, I created a shader that get the actual color of the surface and render it to the closer of a cga palette I have to change it to swap the palette in 4 colors but I don't know how secondary, I have to render it dynamic (maybe using an uniform variable) because it have to change in base of the...
Top