Jump to content

Welcome to AnimePassion
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. If you already have an account, login here - otherwise create an account for free today!
Photo

Shaders in latest MPC-HC / CCCP


  • Please log in to reply
19 replies to this topic

#1
FoxesDen

FoxesDen

    Red Ribbon Army

  • VIP
  • 563 posts
  • 23 thanks
  • Local time: 04:07 PM
  • LocationGreat White North
The latest version of MPC-HC that comes with CCCP 2014-01-17 has made drastic changes yet again to the Shaders. The settings for Shaders has been moved into the Options window: Options->Playback->Shaders. You can still open the Settings via the menu Play->Shaders->Select Shaders... but it just takes you to the appropriate settings in the Options window.

The big change I just don't get is that they removed all the built-in shaders. You now need to use an "Add shader file" button to import .hlsl files that contain the code for the shaders. The problem is, CCCP didn't include any shader files with the install. For those people that used "Sharpen complex 2", or any of the other common shaders, I found .hlsl files for them here. For each shader that you want, click on the link for it to open the web page for it, then click the "Raw" button to view just the raw source. Now press ctrl-s to save, and save it somewhere for use with MPC-HC.

Once you've saved any shaders you want, open up the new Options for Shaders in MPC-HC and click the "Add shader file" to add your shaders. This just adds them to the available list. To actually activate them, select a shader in the list, then click "Add to pre-resize" or "Add to post-resize" as desired. Click Apply or OK to activate them.

Note, they also removed the ability to turn shaders off & on. Any shaders that are added are on, period. You can however create different "Shader presets" then assign keyboard shortcuts to cycle through them if you want.
ztor6.jpg

Thanked by 1 Member:
KhR0N1K

#2
Koby

Koby

    Beyond the Grave

  • Trusted Encoders
  • 1,196 posts
  • 71 thanks
  • Local time: 02:07 PM
I prefer to let the files play as intended. It's hard to judge how to encode something if you're previewing it with all sorts of filters/shaders/etc...

If the encode was properly sharpened, you wouldn't need to add a sharpen shader anyhow... and sometimes the sharpening can ruin things.


Z0SZ1y4.jpg
Social Networks: [Facebook] [Twitter] [MyAnimeList] [MALgraph] [Steam] [Trakt.tv]
"I'd like to share a revelation I've had during my time here. It came to me when I tried to classify your species. I realized that you're not actually mammals. Every mammal on this planet instinctively develops a natural equilibrium with their surrounding environment, but you humans do not. You move to another area, and you multiply, and you multiply, until every natural resource is consumed. The only way you can survive is to spread to another area. There is another organism on this planet that follows the same pattern. Do you know what it is? A virus. Human beings are a disease, a cancer of this planet. You are a plague, and we are the cure." - Agent Smith´╗┐


#3
FoxesDen

FoxesDen

    Red Ribbon Army

  • VIP
  • 563 posts
  • 23 thanks
  • Local time: 04:07 PM
  • LocationGreat White North
True, but the "Sharpen complex 2" filter is really good for DVD encodes, and will generally make even quality 720p encodes look nicer when played on 1080p displays, which is usually the case. Of course there's also personal preference for such things.

But regardless of any of that, this was a drastic change that was made with no real info on how to deal with it, so after figuring things out I thought I'd share what I learned. It might be worth grabbing those shaders whether you intend to use them or not, while you know a place to get them. You can add them to the list in MPC-HC without actually activating any of them. At least the option to use them will be there.

P.S. Just use VLC to preview original encode quality. It may not be the best player, but it is the best way to view "original and unmolested" video data. And because of this, it is also the best way to take unmolested screenshots. Combine that with the fact VLC takes screenshots with anamorphic ratios already applied, and with subtitles, and it's easily the #1 method for accurate, concise screenshots.

You can't step-frame in VLC though, but to get the frame you want just slow the playback speed to 0.25x or 0.12x speed then quick tap the space bar to start/stop play until you reach the exact frame you want. Then press shift-s to take your screenshot.

Also, since VLC uses only built-in codecs, it won't interfere with other players or codec packs in any way, and they won't interfere with it. You can keep it installed along with your main player without any worries.
ztor6.jpg

#4
Cman21

Cman21

    /)*(\ ^_^

  • Administrators
  • 2,439 posts
  • 257 thanks
  • Local time: 03:07 PM
i do not recommend ever using vlc... even on default settings the codecs/filters used can drastically change image quality. or at least the version i looked at a few years ago anyway.

#5
FoxesDen

FoxesDen

    Red Ribbon Army

  • VIP
  • 563 posts
  • 23 thanks
  • Local time: 04:07 PM
  • LocationGreat White North

i do not recommend ever using vlc... even on default settings the codecs/filters used can drastically change image quality. or at least the version i looked at a few years ago anyway.

I think you're making the same mistake many other people do. VLC doesn't perform color matching, whereas MPC-HC does. The colors can look quite different, but the actual pixel data is the same. MPC-HC will look nicer, but VLC will be the actual true source image.

VLC playback is actually what the "normal" video looks like. It only looks worse by comparison since MPC-HC (and other codec-based players) color match their data. In fact, in certain configurations of MPC-HC you can output screenshots in their pre-color matched form, and they they will look exactly the same as the VLC screenshots.

And remember this too, when dealing with digital data there's one one way to decode it, whether it be video, audio, or whatever, so it will all be the same no matter who decodes it. Any differences in output is because somebody is altering the data after the fact. In this case it's color matching.
ztor6.jpg

#6
JohnFlower

JohnFlower

    Magical Girl

  • VIP
  • 810 posts
  • 39 thanks
  • Local time: 09:07 AM
  • LocationNew Zealand
Well, if you want to get fussy about your screenshots, use AvsPmod.

On the shaders side... Is there any advantage in using them when you use madVR with Jinc4 + anti-ringing? I prefer my image to look at close to source as possible, so I'm guessing I would still stay away from those shaders.

#7
13ack.Stab

13ack.Stab

    Assassin

  • Administrators
  • 1,719 posts
  • 16 thanks
  • Local time: 03:07 PM
  • LocationMichigan, USA

Well, if you want to get fussy about your screenshots, use AvsPmod.

On the shaders side... Is there any advantage in using them when you use madVR with Jinc4 + anti-ringing? I prefer my image to look at close to source as possible, so I'm guessing I would still stay away from those shaders.


On an unrelated note, madshi has repeatedly recommended Jinc3 over any other iteration: as there is hardly any change between the visual fidelity of the resulting image, the additional overhead isn't worth the trouble. Personally, I'm interested in taking a look at the new features in 0.87.x once all the (very noteworthy) bugs have been hammered out, specifically NNEDI3, OpenCL, and the improved debanding.

Posted Image


#8
FoxesDen

FoxesDen

    Red Ribbon Army

  • VIP
  • 563 posts
  • 23 thanks
  • Local time: 04:07 PM
  • LocationGreat White North

On the shaders side... Is there any advantage in using them when you use madVR with Jinc4 + anti-ringing? I prefer my image to look at close to source as possible, so I'm guessing I would still stay away from those shaders.

I assume you specifically mean the "Sharpen complex 2" shader. I haven't used Jinc4 or the anti-ringing filter so I honestly couldn't say for sure, but probably not. It would likely make the image look over-filtered. In the end it really just comes down to what looks better to you. Try it and see.

But I can say there are situations where I wouldn't use it. With bad quality DVD rips that have lots of artifacts it will generally just make the artifacts stand out more and look worse. Although maybe in this case using the anti-ringing filter with it will in fact make the image look better. Also, heavy film grain won't generally look good with it either. Quality grain such as in Studio Ghibli movies may look okay, again it comes down to personal preference, but the kind of crap grain that I'd call film "noise" tends to look worse. This is why I wish they left in the shortcuts to quickly turn shaders off and on, but you can set up presets at least, and add keyboard shortcuts to cycle through them. (Create a preset with no shaders, and one with.)

I still use CCCP 2013-11-27 on the machine I watch stuff with, so things still work the way I liked them. I won't upgrade it until if & when there's good reason to.
ztor6.jpg

#9
JohnFlower

JohnFlower

    Magical Girl

  • VIP
  • 810 posts
  • 39 thanks
  • Local time: 09:07 AM
  • LocationNew Zealand

On an unrelated note, madshi has repeatedly recommended Jinc3 over any other iteration: as there is hardly any change between the visual fidelity of the resulting image, the additional overhead isn't worth the trouble. Personally, I'm interested in taking a look at the new features in 0.87.x once all the (very noteworthy) bugs have been hammered out, specifically NNEDI3, OpenCL, and the improved debanding.

I know, but who really cares when it works? If I could run Jinc8 + AR without dropping frames I would~
More features are great, but nvidia + OpenCL makes me sad... To quote tp7:

[14:15:04] <tp7> nev and cyberbeing telling him to go CUDA
[14:15:10] <tp7> that's interesting
[14:15:23] <tp7> and rather unfortunate
[14:15:50] <tp7> since it's now completely unclear if we should go with CUDA or OpenCL for CPU support in avs when it's implemented
[14:16:11] <tp7> SEt is a known OpenCL fag of course and he most likely has an ATI card
[14:16:39] <tp7> but as it looks now we're basically support nvidia OR ati users

Which is probably what is going to happen here if madshi continues to use OpenCL. You can already see the problems it's causing for nvidia users.


@FoxesDen, I figured as much. As it stands now, I only watch DVD encodes when I have to. When I do watch DVD encodes, they're normally filtered enough for me just to upscale with Jinc.

#10
13ack.Stab

13ack.Stab

    Assassin

  • Administrators
  • 1,719 posts
  • 16 thanks
  • Local time: 03:07 PM
  • LocationMichigan, USA

More features are great, but nvidia + OpenCL makes me sad...


Yeah, I'm in the same boat. Apparently it works with an older driver revision (from about a year ago) and doesn't work with anything more recent, so I'm still hoping there's a fix in the works.

Posted Image


#11
KhR0N1K

KhR0N1K

    Tsundere

  • Inactive Member
  • 8 posts
  • 0 thanks
  • Local time: 04:07 PM
  • LocationToronto, Canada

hey i was wondering if anyone can help me out with something. with the new shaders i noticed when i debug "Sharpen Complex 2" i get

 

C:\Users\myusername\Sharpen complex 2.hlsl(92,8): warning X3206: implicit truncation of vector type
C:\Users\myusername\Sharpen complex 2.hlsl(100,8): warning X3206: implicit truncation of vector type

 

i can see when i apply the shader that it is doing something (sharpening), but when compared side by side with the older MPC-HC versions and shaders i can see that the new Sharpen Complex shader is not working correctly.

 

does anyone else have this issue? im going to assume yes. Or if anyone knows why this is happening or how to fix it i would be very appreciative and guessing some other may be as well. thanks very much in advance and Happy easter



#12
KhR0N1K

KhR0N1K

    Tsundere

  • Inactive Member
  • 8 posts
  • 0 thanks
  • Local time: 04:07 PM
  • LocationToronto, Canada

anybody ? :(. i really want to update but i cant until i get this sharpen complex 2 shader working correctly

 

please :D



#13
JohnFlower

JohnFlower

    Magical Girl

  • VIP
  • 810 posts
  • 39 thanks
  • Local time: 09:07 AM
  • LocationNew Zealand
Going to give you the classic 'werx4me' post~

Using MPC-HC version 1.7.4 (32bit) with external LAV filters version 0.61.2 (32bit) and madVR version 0.87.10, I can confirm that the shader supplied here works (and looks like shit).

#14
KhR0N1K

KhR0N1K

    Tsundere

  • Inactive Member
  • 8 posts
  • 0 thanks
  • Local time: 04:07 PM
  • LocationToronto, Canada

Going to give you the classic 'werx4me' post~

Using MPC-HC version 1.7.4 (32bit) with external LAV filters version 0.61.2 (32bit) and madVR version 0.87.10, I can confirm that the shader supplied here works (and looks like shit).

im using all the same but internal LAV filters. did u just add them like normal though enternal filters option? would that make a diff with the vector errors im getting when i use MPC-HC debug shader option. and like i said before its sharpening but not correctly i can see when i compare.

 

thanks for your response btw



#15
JohnFlower

JohnFlower

    Magical Girl

  • VIP
  • 810 posts
  • 39 thanks
  • Local time: 09:07 AM
  • LocationNew Zealand
'Sharpen complex 2' was already listed under Shaders. I assume they were installed by an older MPC-HC version, as my shaders directory (C:\Program Files (x86)\MPC-HC\Shaders) has all the current files. I also tested against a fresh copy from the link I posted above, the results were identical.

What you are getting is a warning. It is nothing to worry about, but if you must get rid of it, change the lines mentioned from 'float' to 'float4'. You will note that this makes absolutely no change to the output.

As for the difference... Can you provide screenshots to compare the two versions? Do multiple shots from varying encodes to make sure it isn't file specific.


If all else fails, just edit the hlsl yourself and change the values to suit your needs.

#16
KhR0N1K

KhR0N1K

    Tsundere

  • Inactive Member
  • 8 posts
  • 0 thanks
  • Local time: 04:07 PM
  • LocationToronto, Canada

'Sharpen complex 2' was already listed under Shaders. I assume they were installed by an older MPC-HC version, as my shaders directory (C:\Program Files (x86)\MPC-HC\Shaders) has all the current files. I also tested against a fresh copy from the link I posted above, the results were identical.

What you are getting is a warning. It is nothing to worry about, but if you must get rid of it, change the lines mentioned from 'float' to 'float4'. You will note that this makes absolutely no change to the output.

As for the difference... Can you provide screenshots to compare the two versions? Do multiple shots from varying encodes to make sure it isn't file specific.


If all else fails, just edit the hlsl yourself and change the values to suit your needs.

 

ok i will try the float thing. and will make screenshots. im comparing it to the older version of mpc-hc (1.7.1.96) before it started using hlsl shaders. i tried multiple files open the same file in both players went to the same frame and jus clicked back and fourth between players and i can see the difference. also i did edit the original sharpen complex 2 a bit to make it look better i should try the default one again and get rid of the error from what you told me and try again, the difference was pretty big though i jus assumed it wasn't working correctly because of the added debugging errors.

 

these are the values i used on the older version of sharpen complex 2

 

#define moyenne 0.9
#define dx (moyenne*px)
#define dy (moyenne*py)

#define CoefFlou 3
#define CoefOri (1+ CoefFlou)

// pour le sharpen
#define SharpenEdge 0.12
#define Sharpen_val0 2.2



#17
KhR0N1K

KhR0N1K

    Tsundere

  • Inactive Member
  • 8 posts
  • 0 thanks
  • Local time: 04:07 PM
  • LocationToronto, Canada

ok so im an idiot and it is working fine. even with said errors lol. it was jus my custom changes were the diff i sort of forgot that i had changed the original one. sorry for the confusion and thanks for all the help i really do appreciate ur time and effort.

 

now i jus gotta edit the new one with my values and should be good to go and up to date :D

 

now i jus gotta figure out how to edit it. im hoping i can jus change it to txt put in values then rname to .hlsl



#18
KhR0N1K

KhR0N1K

    Tsundere

  • Inactive Member
  • 8 posts
  • 0 thanks
  • Local time: 04:07 PM
  • LocationToronto, Canada

ok well that didnt seem to work lol. looks like maybe visual studio 2013 i hope lol



#19
JohnFlower

JohnFlower

    Magical Girl

  • VIP
  • 810 posts
  • 39 thanks
  • Local time: 09:07 AM
  • LocationNew Zealand
Any text editor will do. Try notepad++

#20
KhR0N1K

KhR0N1K

    Tsundere

  • Inactive Member
  • 8 posts
  • 0 thanks
  • Local time: 04:07 PM
  • LocationToronto, Canada

ya i just realized i saved it wrong the first time from the site i did save target as instead of going to RAW first then saving. i guess i coulda used the one thats in the Shaders folder that came with mpc-hc as well lol. i dunno why im not thinkin straight, gotta stop smoking so much lol

 

and yes it is working after editiing with notepad

 

thanks again :D

 

at least i got it working before i installed VS lol :sofa:

 

edit: also the float4 thing you proposed worked as well to get rid of the vector errors with no change to the output as you said. :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users