YesNoOk
avatar

Someone Get Up There And Fix The Antenna! (Read 12164 times)

Started by Bronko, August 14, 2013, 09:45:48 pm
Share this topic:
Someone Get Up There And Fix The Antenna!
#1  August 14, 2013, 09:45:48 pm
  • ******
  • Just a butcher on a mission.
    • www.justnopoint.com/lbends
Re: Someone Get Up There And Fix The Antenna!
#2  August 14, 2013, 09:50:29 pm
  • ****
  • play more SNK games
  • I FUCKING LOVE PLATINUM!
    • South Africa
    • www.trinitymugen.net/
Why would I want this? :stare:
Re: Someone Get Up There And Fix The Antenna!
#3  August 14, 2013, 09:58:17 pm
  • *****
  • Horrible
    • Sweden
    • http://network.mugenguild.com/anjel/
My shitty mugen stuff:

Bea

Re: Someone Get Up There And Fix The Antenna!
#4  August 14, 2013, 11:08:31 pm
  • *****
  • MUGEN Grandma
    • Brazil
    • www.smeenet.org
Ohhh... pixel shaders.
Could be handy... if you could call them at specific moments.
Princess Adora: "My friend saw She-Ra take her dress off in the shower. She said she has an 8 pack. She said She-Ra is shredded."

SF2NES is dead. Long live SF2NES.
Re: Someone Get Up There And Fix The Antenna!
#5  August 14, 2013, 11:11:33 pm
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
Re: Someone Get Up There And Fix The Antenna!
#6  August 15, 2013, 12:06:06 am
  • ******
  • Just a butcher on a mission.
    • www.justnopoint.com/lbends
It's a fragment shader that modifies the colors of indexed sprites to greenscale.
Re: Someone Get Up There And Fix The Antenna!
#7  August 15, 2013, 12:22:37 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
Re: Someone Get Up There And Fix The Antenna!
#8  August 15, 2013, 12:28:55 am
  • ******
  • Just a butcher on a mission.
    • www.justnopoint.com/lbends
The file is written in GLSL

Go down to the bottom and you'll see the main program and where I've made a modification

Code:
void main()
{
  vec4 color = nearest();

#if !defined(PALFX_DISABLE)
  palfx(color);
#endif

float grayval = 0.21*color.r + .71*color.g + .07*color.b;
 
  gl_FragColor = vec4(0,grayval,0,color.a);
}

nearest() is a function defined earlier in the file that determines which color of the palette (sampler1D texunit1) to use for the current pixel.
palfx() is the function defined that executes all of the palfx stuff you coded into your character.

gl_FragColor is the variable which the shader returns after the code has finished running.  Here I've calculated a weighted average based on the color I was going to use, and instead used that value as the green channel for the final result.  I've zeroed out red and blue, and copied the alpha value from the original result.

     Posted: August 15, 2013, 12:58:07 am
Unfortunately mugen currently does not employ the use of a full screen shader.  This means that messing with the vertex shader is pretty much off-limits.


File is embarassingly small so indexed.vert is in its entirety here
Code:
#version 120

void main()
{
vec4 foo = gl_Vertex;
foo.x *= .5;
foo.y *= .5;

  gl_TexCoord[0] = gl_MultiTexCoord0;
 
  gl_Position = gl_ModelViewProjectionMatrix * foo;
}
Cartoon Outlines
#9  August 15, 2013, 02:09:23 am
  • ******
  • Just a butcher on a mission.
    • www.justnopoint.com/lbends
Re: Someone Get Up There And Fix The Antenna!
#10  August 15, 2013, 02:22:40 am
  • ******
  • I have plans for those teeth!
    • USA
    • network.mugenguild.com/jmorphman
Wow, this is pretty cool.
Re: Someone Get Up There And Fix The Antenna!
#11  August 15, 2013, 05:30:23 am
  • ******
  • Just a butcher on a mission.
    • www.justnopoint.com/lbends
Re: Someone Get Up There And Fix The Antenna!
#12  August 15, 2013, 05:37:10 am
  • ******
  • Complex
    • Panama
    • Skype - lopezantispam@hotmail.com
So, this are image renderers for mugen?? or something coded into a character?? I´m pretty clueless with this but I gotta say it´s pretty interesting. The cartoon outline is pretty cool.
Re: Someone Get Up There And Fix The Antenna!
#13  August 15, 2013, 05:39:19 am
  • ******
  • I have plans for those teeth!
    • USA
    • network.mugenguild.com/jmorphman
Seems to be bugging out for afterimages:
Re: Someone Get Up There And Fix The Antenna!
#14  August 15, 2013, 05:40:45 am
  • ******
  • Just a butcher on a mission.
    • www.justnopoint.com/lbends
I removed a line of code that elecbyte wrote to hackishly fix that.  I shouldn't have.

Edit: Fixed
Edit2: AAAAAAAAAAA fixed for real
Last Edit: August 15, 2013, 06:19:00 am by Smile Master
Re: Someone Get Up There And Fix The Antenna!
#15  August 15, 2013, 07:59:57 am
  • **
    • Russia
Is it possible to use Doubleres=2 like in winmugen but in mugen 1.0 and above using this tool?))
Re: Someone Get Up There And Fix The Antenna!
#16  August 15, 2013, 08:02:37 am
  • ******
  • Just a butcher on a mission.
    • www.justnopoint.com/lbends
You can't do that already?
Also, no.  That requires using the vertex shader.
Re: Someone Get Up There And Fix The Antenna!
#17  August 15, 2013, 08:25:10 am
  • *****
    • Puerto Rico
    • www.youtube.com/user/Darkflares

  • Online
Some of these effects woud be great in videos...
Re: Someone Get Up There And Fix The Antenna!
#18  August 15, 2013, 08:27:35 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
I love the cartoon shader its awesome! the only thing that bugs me is that it traces shadows and
some things that should be transparent like rays of light.
other than that i love it.  BTW is this only for 1.1? i was gonna use it in
Capcom vs the World but didnt see the frag files in the data folder.
some pics for the hell of it.

Re: Someone Get Up There And Fix The Antenna!
#19  August 15, 2013, 08:44:18 am
  • ******
  • Just a butcher on a mission.
    • www.justnopoint.com/lbends
Re: Someone Get Up There And Fix The Antenna!
#20  August 15, 2013, 09:23:53 am
  • *****
  • Estoy siempre listo para un desafío.
    • Puerto Rico
    • im41784@yahoo.com
how about a 3D glasses filter?