Graphics Blood screen damage

jf_knight

Member
I'm surprised i couldn't find any tutorials, marketplace assets, or shaders on how to create the iconic red-edged screen/hud damage effect in gamemaker studio. Can anyone help?
 
The reason you don't find anything is because there are so many ways to go about an admittedly simple effect that it would be pointless to have specific tutorials and assets for it, not to mention how few people use 3D so it's even less likely that anything will exist.

What exactly do you need help with?
 

DukeSoft

Member
Easiest way would be to;

- Create a surface at GUI size
- Draw a red rectangle over the full surface (maybe even some cool bloody shaped thingie?)
- Draw a round gradient alpha circle over it depending on the damage
- Draw surface over game screen (possibly under GUI, looks weird if its over GUI)
 

jf_knight

Member
The reason you don't find anything is because there are so many ways to go about an admittedly simple effect that it would be pointless to have specific tutorials and assets for it, not to mention how few people use 3D so it's even less likely that anything will exist.

What exactly do you need help with?
I thought so. I'm not asking for help how to make it, I'm looking for help looking for a tutorial / already-made asset. Saving time over making a simple feature from scratch.
 
But what exactly are you looking for? Like I said, there are so many ways. You might as well be asking "give me a gun model" without specifying its class, how many polys it should have, the art style, if it's real or fictional, ammunition type, if its sights are able to be looked down, file type, etc. DukeSoft gave you an example, but it could be completely against what you're after.
 

jf_knight

Member
But what exactly are you looking for? Like I said, there are so many ways. You might as well be asking "give me a gun model" without specifying its class, how many polys it should have, the art style, if it's real or fictional, ammunition type, if its sights are able to be looked down, file type, etc. DukeSoft gave you an example, but it could be completely against what you're after.
I'd be happy with a shader/ glsl code (if thats not too much of an overkill). I've learned how to translate shadertoy glsl into gamemaker glsl (no luck looking there either). OR perhaps a scrip that does it through an alpha gradient like DukeSoft suggests.
 

Bingdom

Googledom
Code:
gl_FragColor = vec4( v_vColour.rgb * texture2D( gm_BaseTexture, v_vTexcoord ).rgb, distance(vec2(0.5), v_vTexcoord)*intensity );
Intensity is a uniform float.
Draw it to the application surface.

If you want to make a separate surface for it, the shader could be written more efficiently (get rid of texture2D).

The effect you're looking for is called a vignette. If the one I wrote is something you don't like, I managed to find one on shadertoy.
 

jf_knight

Member
Code:
gl_FragColor = vec4( v_vColour.rgb * texture2D( gm_BaseTexture, v_vTexcoord ).rgb, distance(vec2(0.5), v_vTexcoord)*intensity );
Intensity is a uniform float.
Draw it to the application surface.

If you want to make a separate surface for it, the shader could be written more efficiently (get rid of texture2D).

The effect you're looking for is called a vignette. If the one I wrote is something you don't like, I managed to find one on shadertoy.
Thank you. This helps :)
 
Top