vertex

  1. 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...
  2. Posho

    3D Flipping a Layer?

    Hello :) I've been trying to figure out how to do 3D with billboarded sprites. I've been reading a bit into how GMS2 works and found out everything is already being rendered in 3D. Turns out you can draw regular GM sprites in the XY plane and adjust their "Z" by using the layer's depth...
  3. mbeytekin

    Texture2DLod doesn't work in vertex shader?

    I can't get any colors from texture2dLod in vertex shader? How we use texture2dLod function in GameMaker? My example code like that in vertex shader; attribute vec3 in_Position; varying vec2 fragCoord; varying vec4 Colour; uniform vec3 iResolution; uniform sampler2D tfm; void main() {...
  4. Erik Leppen

    GMS 2 Vertex buffers: extend after vertex_end? Drawing a trace curve

    How do I extend a vertex buffer with additional vertex data after it has been closed with vertex_end, and without removing all existing vertex data in it? Basically what I want is a moving instance drawing its trajectory. Because drawing all segments every step is way too slow, I want to use a...
  5. Gizmo199

    3D How do vertex buffers handle the 'z' in vertex_position_3d? [GMS2]

    I posted this on the sub-reddit but I figured id try here as well: So I have a vertex buffer drawing a bunch of sprites that are stacked one on top of the other in a vertex buffer. Each sprite has a "height" that I put into the vertex_position_3d 'z' function. Now everything within the vertex...
  6. Desix

    Shaders [Solved] Applying shader to coloured vertex buffer

    Hi there. I'm sure this one's simple to those experienced with shaders and buffers. The goal itself IS simple to explain. I need to apply a fade shader I have (or create a new one to perform the same function) to a plain colour/alpha un-textured vertex buffer. I'm not that great with either...
  7. Posho

    GMS 2 [Solved] 3D Walls in Studio 2

    Hello, With the death of d3d functions, I've been having to fiddle with vertex buffer functions which is a completely new ground to me. Whilst I was able to pull off drawing floors with textures, I can't properly pull off walls. Can anyone who knows how this works, please help me with this...
  8. E

    GML Drawing Distorted Texture Primitives - Texture Folds Wrong

    Please help me figure this out. My attempt at creating a surface-drawing script similar to draw_sprite_pos() has run into a snag. Here is the script: ///@description draw surface perspective ///@param x ///@param y ///@param surface ///@param distort ///@param squish var surface_id =...
  9. Zaid

    GMS 2 [SOLVED] Multiple textures on a single vertex buffer

    GMS2 IDE v2.2.1.375 GMS2 Runtime v2.2.1.291 Preface: I have been briefly learning how 3D works within GMS2 and am trying to write a simple 3D game by scratch so I understand all of the ins-and-outs. No 3rd party extensions and 3rd party scripts are only allowed if I fully understand them. Just...
  10. Erik Leppen

    GML vertex_begin and vertex_end: how are they best used?

    I want to create a set of scripts to draw vertex primitives more easily. So, I want to create a vertex buffer and then call some scripts to put shapes in them. So the idea is: Event code: //create vertex buffer //call script to add positions, colours etc. //call script to add positions, colours...
  11. X

    Shaders Shader gm_BaseTexture problems.

    I've been trying my best to understand this problem. I've read the manuals, and everything I use should be correct, but I keep getting an error. The error I get is as follows: Reading project file... Error compiling vertex shader: In Shader shader_shader at line 11 : 'gm_BaseTexture' ...
  12. W

    GMS 2 Shadow collision? (Need help/ideas)

    So I started two months ago (again) with Gamemaker Studio 2 and wanted to create a "solid" shadow for a little 2D Puzzle Platformer. Shadowcasting was no problem after following this Guide, but I can't figure out a good (not performance heavy) way to check for collision. Tried to check for for...
  13. M

    Mp_grid_draw vertex buffer crash

    Hey! Trying to draw my grid using mp_grid_draw, but I keep getting the vertex buffer crash as if I try and draw something that exceeds the room. Would anyone know why that is?
  14. 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...
  15. Megax60

    Shader bug

    Here is the daily question: How do i prevent "my" sprite from this to happen when i apply a shader http://i.imgur.com/0bTl0TP.png My shader vertex is the default and the fragment is this: // // Simple passthrough fragment shader // varying vec2 v_vTexcoord; varying vec4 v_vColour; void...
  16. Kaliam

    GMS 2 3D: drawing a vertex buffer at different coordinates/location?

    Hello, I'm just curious if anyone knows of a way to draw a frozen vertex buffer at a different location on screen? I've checked through the documentation for a way to do this and so far the only thing I could find is: matrix_transform_vertex(matrix, x,y,z,) However, since i'm pretty sure a...
  17. Carl Nylander

    Question - Code [Shader] vertex_format_add_custom

    Hello community! I'm having trouble using vertex_format_add_custom(). I know there have been trouble using it before but now I can't even use my workaround from GMS 1.x. Using the following code will throw an error in the console "Draw failed due to invalid input layout"...
  18. xDGameStudios

    GMS 2 Convert to vertex buffer (dynamically passing positional data to shader)

    I found this code in an asset in the marketstore (I'm using it here because I is free, and no credits are required so there should be no problem) I'm trying to learn something about shaders and vertexes... and primitives... and vertex buffers... so here is my question...
  19. gnysek

    Discussion [Proposal] Free asset deformation on asset layer

    While making my current game, I've come to an idea what would be really useful in GM:S 2.0. Since now we have "asset layer" on which we can put sprites instead of objects, it would be nice, if we can transform them. My proposal is, that at least you can select on how many sections sprite should...
  20. Anixias

    Legacy GM Game doesn't actually close..

    Occasionally, on my cousin's pc, my game will only close the window, but not the actual game, eventually throwing a vertex buffer error message, even though his game is closed. It also prevents multiplayer from working as sockets are already in use, and therefore he cannot actually connect...
Top