Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
But how do I call the shader initiation at the right time? Do I use an alarm that counts down from a high enough number until it acquires the sprite post-creation of obj_Critter?
NOTE: in your original post you have the same variable for the width and height of the texel
I'm assuming I have to somehow declare the shader a variable to replace the sprite_index in the view_xview, view_yview line of this Draw event?
Also, can the outline color be changed? How do I control its RGB values?
Thank you for spotting the cloned variable, I forgot to change it.
https://imgur.com/s4MyAKK.jpg
And if I replace sprite_index with shd_OutlineShader, I get the fern only. I don't understand why the fern when sprite_index is clearly the goat.
https://imgur.com/cF7ktUq.jpg
There might be some way to pull something by combining a normal sprite + the shader behind it, I just don't know how to:
1. color the shape of the goat a flat green (no textures, just the color in the shape of the goat)
2. tell the shader which sprite it has to show, as it keeps giving me a sprite unrelated to the actual sprite_index.
Or this https://zimventures.com/2017/10/03/shader-for-dynamic-sprite-outlines-in-game-maker-studio-2/
I just don't understand how to use it for my situation though, as it would still give the wrong sprite.
you can see the value of each resources index by drawing it to the screen or having it post to the output with show_debug_message()
So let's say the the shader index for the outline shader == 1
and teh sprite index for the fern == 1
https://imgur.com/9ZcvoNM.jpg
Using 4 sprites rendered somehow as a green alpha mask, offsetting each of them + the default sprite above them, so they'd move together and produce the effect I want. But how do I tell Gamemaker to create a colored alpha mask by itself?
https://imgur.com/MpZJaim.jpg
Maybe I could tell the scanner screen to display it while the obj_Critter creates the outline. (scratch that, it wouldn't show it on top since the screen is under the outline) Or is there some way to separate shader from actual sprite in a single object?
The draw_self() seems to create the original too but places it in the wrong area:
https://imgur.com/nuoeQig.jpg
EDIT: created 2 shaders and overlapped them
https://imgur.com/0W8j224.jpg
https://imgur.com/uXbwn5k.jpg
The original sprite isn't limited in that area (other than its precise mask)
https://imgur.com/BLF0XXD.jpg