• 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!

opengl

  1. foreverisbetter

    Shaders enabling glsl es EXT_polygon_offset_clamp extension

    Hello, I've found a git repository in which someone was able to enable gl_frag_depth in a glsl es shader with #extension GL_EXT_frag_depth : require and the same person was able to do the same with #extension GL_OES_standard_derivatives : require for fwidth() And as far as I can tell it...
  2. mbeytekin

    Unclamped RGB in shaders? Possible?

    GM2 clamps rgb values (0-1) in shaders.. Is there any way to unclamp them? Because when I implement shaders from other sources like shadertoy I realized they are not clamping rgb values and rgb values can get - and + float. Yes I can normalize in a range them with very high precision floats...
  3. mbeytekin

    Bitwise AND operator in shaders

    How can I calculate this in GM2 fragment shader; m[(k+4)&7] += vec4(c1 * wk, wk); s[(k+4)&7] += cc1 * wk; (k+4)&7 gives a syntax error in GM2.. I found this code from shadertoy and it works there... https://www.shadertoy.com/view/ltyyDd
  4. 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...
  5. Divinik

    Shaders Dynamic Spotlight Shader?

    So the game I'm working on has enemies that have a visible cone-shaped line of sight. I want to implement a shader that makes it so that if part of the spotlight sprite is either colliding with a solid object, or a solid object is between the pixel and the cone's parent object, that part of the...
  6. Bart

    Shaders Built-in lighting functions

    Hi all. The manual has a chapter on lighting. It has a couple of functions like draw_light_define_ambient, draw_light_define_point, draw_light_define_direction, ... I can access gm_LightingEnabled, MAX_VS_LIGHTS, gm_LightingEnabled and a couple of other variables in the shader. But there...
  7. H

    Alpha GMLGL - GLFW/OpenGL wrapper

    GMLGL GLFW/OpenGL wrapper for Gamemaker Studio This is an extension that allows you to program directly with OpenGL. Currently only being tested and compiled for Windows. But GLFW and OpenGL are both cross-platform. I plan on building for LInux and Mac since it's just a matter of building the...
  8. Erayd

    Shaders Using one rendered texture to change another

    I'm trying to find a way to change the color of only the pixels on an object that are being overlapped by the pixels of another. For example, there is a house in a 2.5d environment, an NPC walks behind the house but their head is still visible. At this point, the body is invisible, unless I...
  9. M

    Shaders Shader programming: Gamemaker and Unity

    Hi! I was just wondering how indepth the shading programming in Gamemaker is compared to Unity's. I am fairly certain that they both use the GLSL ES language but I wanted to see if anyone had experience before I dive in! This is of course guided towards the 2D aspects since Unity has more...
  10. 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...
  11. H

    Question - Code Pass GML script to C++ extension?

    I'm working on an OpenGL extension and there are a good amount of functions that take a callback function. Instead of having every callback function hard coded in the extension, I'd like to pass a GML script to the extension so the end user can have more control over what happens in each event...
  12. Poking Pug

    Question - Code What GLSL version is Studio v2 using?

    Hi all! I saw that v2 of Studio now has nice and simple ways of creating your own vertex and fragment shaders, but nowhere in the manual did I see the current supported version of the GLSL syntax. For all target platforms it says we can use GLSL ES and it also mentions that for HTML5 we need...
  13. T

    OpenGL

    I'm confused does GameMaker Studio use OpenGL SL or not? It says it does but when I tried to implement an openGL line of code (glReadPixels) it threw an error saying overloaded function not specified? and yet all the shader syntax and code is written useing the openGL SL?? If so which version of...
Top