ZombieSquirrel
Member
Hi everyone,
I've been learning a bit about vertex shaders.
I'm still finding it a bit hard to understand,
but I'm beginning to understand how you'd do things
like split up/shake/swivel an object's sprite using verteces.
However, what I don't yet "see" is how I can pass an object without a sprite,
but one that uses a draw_sprite function in its draw event, through a shader as well.
Basically, I have an object that can "become" multiple sprites, by conditions
in its draw event. I only want one of those potential sprites to be able to
use the properties of the vertex shader.
Basically, if a certain condition is met, the object will draw a certain sprite,
and if a collision with the player is found, only with that sprite must the object
appear to "shake" a bit. I'm not gonna use the build in coordinates, rotation, scales,
of things like draw_sprite_general. I really want that smooth "bending shaky"
effect.
So the question is: what are some of the basics I need to understand
in order to have an object with no sprite attached, that draws a sprite in its draw event,
and then have that sprite do some "vertex shader" magic?
The conditions before the shader can be accessed is something i can probably figure out myself.
I' like to understand the shader-aspect part of it, and how to properly place the code
for the shader in the object's draw event, which i often mess up to be honest.
I've been learning a bit about vertex shaders.
I'm still finding it a bit hard to understand,
but I'm beginning to understand how you'd do things
like split up/shake/swivel an object's sprite using verteces.
However, what I don't yet "see" is how I can pass an object without a sprite,
but one that uses a draw_sprite function in its draw event, through a shader as well.
Basically, I have an object that can "become" multiple sprites, by conditions
in its draw event. I only want one of those potential sprites to be able to
use the properties of the vertex shader.
Basically, if a certain condition is met, the object will draw a certain sprite,
and if a collision with the player is found, only with that sprite must the object
appear to "shake" a bit. I'm not gonna use the build in coordinates, rotation, scales,
of things like draw_sprite_general. I really want that smooth "bending shaky"
effect.
So the question is: what are some of the basics I need to understand
in order to have an object with no sprite attached, that draws a sprite in its draw event,
and then have that sprite do some "vertex shader" magic?
The conditions before the shader can be accessed is something i can probably figure out myself.
I' like to understand the shader-aspect part of it, and how to properly place the code
for the shader in the object's draw event, which i often mess up to be honest.