Log in

View Full Version : Custom shaders in MPC?


PhakeDC
17th August 2006, 13:26
Hello, I was wondering whether some clever coder out there has mananged to utilise the shader editor in MPC to write new useful shaders (e.g. luminance fix) to use during playback? I searched the web, to no avail. Thanks for any help!

PS - I want shaders to use with "rogue" video formats like RMVB which don't conform to MPC Directshow standards (and thus aren't subjected to external filters like FFDShow or AviSynth.

clsid
17th August 2006, 13:43
You mean something like this:

sampler s0 : register(s0);

#define Const_1 (16.0/255.0)
#define Const_2 (255.0/219.0)

float4 main(float2 tex : TEXCOORD0) : COLOR
{
return( ( tex2D( s0, tex ) - Const_1 ) * Const_2 );
}

mike_lee
18th August 2006, 05:46
Thanks, that's nice. Did you code that just for us or do you have a secret stash? What'll it take to bribe you?

PhakeDC
18th August 2006, 22:45
Yep it's nice alright.. Care to share more? ;)

Seb.26
23rd August 2006, 08:39
Yep it's nice alright.. Care to share more? ;)
I've wrote some filters here : http://www.homecinema-fr.com/forum/viewtopic.php?t=29814317
( a French forum ... )

mike_lee
24th August 2006, 23:32
I'm going to check those out right now, thank you. I find the INVERT filter included in the k-lite pack (or from MPC itself) kinda sucky. I've tried to edit it but I can't seem to make it darker (there is a line that reads something like -1, -1, -1, -1 and if you change those you get diff colors and such)

PS. Is the MPC ini file the best way to add shaders?

Seb.26
25th August 2006, 08:46
PS. Is the MPC ini file the best way to add shaders?
by default, MPC store setup ( and shaders ) in registry ... but if you askit, it can use an ini file ...

The "classic" way to add/edit shaders in MPC is to use the Shader Editor ... you can see in real time the result of your change, and you have the result of the shader compiler ... :p

Seb.26
25th August 2006, 08:49
I find the INVERT filter included in the k-lite pack (or from MPC itself) kinda sucky. I've tried to edit it but I can't seem to make it darker (there is a line that reads something like -1, -1, -1, -1 and if you change those you get diff colors and such)
PS. Is the MPC ini file the best way to add shaders?
What kind of effect do you want ?

NB: INVERT is include in MPC by default ... whith some others : wave, spotligh, sharpen, invert, contour, deinterlace, emboss, grayscale, letter box ...ect...