• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Game Support › Wii v
« Previous 1 ... 4 5 6 7 8 ... 83 Next »

[Wii] Donkey Kong Country Returns
View New Posts | View Today's Posts

Pages (22): « Previous 1 ... 16 17 18 19 20 ... 22 Next »
Jump to page 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
[Wii] Donkey Kong Country Returns
02-03-2017, 10:06 AM
#171
CTCaer Offline
Νostalgic gamer
***
Posts: 72
Threads: 2
Joined: Jan 2017
Well I found the shaders and I played a lot with GLIntercept (x64).
But I couldn't fix it..

Maybe I didn't find the correct shader.. It has a function that flashes the image that is manipulated from the shaders.
But let's say that this happens and outputs the result to another shader, then it doesn't flash.
Win 10, Dolphin 5.0-1905.
i7-5820K, 16GB DDR4, AMD R9 280x DC2T.
Find
Reply
02-03-2017, 11:26 AM
#172
CTCaer Offline
Νostalgic gamer
***
Posts: 72
Threads: 2
Joined: Jan 2017
Nevermind found it.

Proof of concept:
[Image: SF8P01-73.png] [Image: SF8P01-63.png]

Sweet Bloom FX!!
Win 10, Dolphin 5.0-1905.
i7-5820K, 16GB DDR4, AMD R9 280x DC2T.
Find
Reply
02-03-2017, 07:53 PM
#173
StripTheSoul Offline
YouKittenMe?
*******
Posts: 4,617
Threads: 37
Joined: Oct 2009
Wow, nice! The downside is that this is different for every game, right?
And what exactly is it you changed and can it be used by anyone? Is it like an extra file we put in the game folder or whatever? If it's a shader file, let me guess, it's not allowed to be shared because there's copyright on it, eh?
Intel i5-4690k (Devil's Canyon) @ 3.5 GHz (+Scythe Mugen) / Gainward GTX 1070 Phoenix (OC'd) / ASUS Z97 PRO GAMER / 16GB G.Skill DDR3-2400 CL10 TridentX / X-Fi XtremeMusic / Win10 Pro 64bit / Dell S2716DG Monitor / 3x original WiiMote+MotionPlus+Nunchuk
Find
Reply
02-04-2017, 08:45 AM
#174
CTCaer Offline
Νostalgic gamer
***
Posts: 72
Threads: 2
Joined: Jan 2017
*Careful: Wall of text and technical bits*

Yes, per game.

Again some more info (all procedures below are simplified) after examining the shader.
The game sends 4 copies of the same EFB copy (2nd stage in a previous post of mine).
And also sends 4 different positions (x.y) and 4 pairs of texture matrices (x and y have separate matrix).

It uses these to transform the texture and then blend it. All of this is done serially by Wii's TEV (Texture Environment Unit) process.
It uses the result of the previous tev to blend each of the 4 images. The 1st image use the original input image.
Also the side images have less brightness than the 2 centered images, to create a fade out effect.

What I did was that I changed the positions of these images to make them more compact.
The original distance is indeed correct. In 640x480 you cant actually see the 4 images that are used for Bloom like effect because of low pixel count.
It looks, like it's really blurred on  all 4 directions.

In bigger resolutions it correctly creates a scaled distance. 
With a bigger internal resolution we have a lot of pixels now and we can clearly see the 4 images used.

If retro studios wanted to create a more smooth shader, they could use 6, 8, 10, etc TEV stages.
Let's explain this in transparency instead of brightness and in 6 TEV stages:
Spoiler: (Show Spoiler)
Based on Original:
img0 -> move +7 pixels. 20% transp

Blend to the original image
TEV 1:
img1 -> move +3 pixels. 50% transp
Blend to previous output
TEV 2:
img2 -> move -3 pixels. 50% transp
Blend
TEV 3:
img3 -> move -7 pixels. 20% transp
Blend and blend to our final effect image


Let's say we want this to look good on bigger resolution or more smooth in wii's original resolution:
TEV 0:
img0 -> move +7 pixels. 20% transp
Blend to the original image
TEV 1:
newimg0 -> move +5 pixels. 35% transp
Blend to the original image
TEV 2:
img1 -> move +3 pixels. 50% transp
Blend to previous output
TEV 3:
img2 -> move -3 pixels. 50% transp
Blend
TEV 4:
newimg0 -> move +5 pixels. 35% transp
Blend to the original image
TEV 5:
img3 -> move -7 pixels. 20% transp
Blend and blend to our final effect image

This will fill the spaces in between and create a more smooth blur.
So more stages, more smooth and better for bigger resolutions
Also this solution is to keep the big size bloom fx. Otherwise, they can just make the distance fixed

Let's move to your questions:
It can only be used with the same UID shader cache. Otherwise it needs a somekind of a hash function that when it finds the same shader to change it with one provided.
Well it may support this. I ddn't check actually.

So, this is an interceptor for OpenGL (yes you guessed it, must be used in OpenGL backend).

Let's go to the critical question. Can this shader or the UID cache be shared?
Yes. Gamecube/wii don't actually use shaders because it don't support it. It has a set of 16 TEV stages and you can use many in a serial way.
What you actually see as shaders and as UID shader cache, is translated vertex and pixel, plus TEV stages process, translated by Dolphin.
It's only illegal to share the original code that was translated to these. Well good luck extracting it from your rip files xD

For example, to share the UID shader cache from Wii U's game, is actually illegal.
Because WiiU has real custom vertex/pixel shader units. So some bits of the code is only translated to fit OpenGL/DirectX/Vulkun requirements.
Anyway, legislation on these is weird. (For example, wii SDK is legal to share since november of 2013, because the console stopped selling worldwide).

Some final thoughts,
Because my hands are "itchy", I will try to do both fixes above and keep the best. And then check if it can be done on the fly.
Win 10, Dolphin 5.0-1905.
i7-5820K, 16GB DDR4, AMD R9 280x DC2T.
Find
Reply
02-04-2017, 09:25 AM
#175
StripTheSoul Offline
YouKittenMe?
*******
Posts: 4,617
Threads: 37
Joined: Oct 2009
Nice, I (having no clue about programming and all that mumbo jumbo) could actually mostly follow your explanations ^_^
I thought you were just a texture creator but it sounds like you might also be helpful in the dev team Smile
Intel i5-4690k (Devil's Canyon) @ 3.5 GHz (+Scythe Mugen) / Gainward GTX 1070 Phoenix (OC'd) / ASUS Z97 PRO GAMER / 16GB G.Skill DDR3-2400 CL10 TridentX / X-Fi XtremeMusic / Win10 Pro 64bit / Dell S2716DG Monitor / 3x original WiiMote+MotionPlus+Nunchuk
Find
Reply
02-04-2017, 09:38 AM (This post was last modified: 02-04-2017, 09:38 AM by CTCaer.)
#176
CTCaer Offline
Νostalgic gamer
***
Posts: 72
Threads: 2
Joined: Jan 2017
Well I was always trying to explain as much as I can, because not all people know or care about technical things.
And it's true and logical. It's useless info if you don't use it.

Dunno about being helpful for the devs..
Actually my knowledge of Dolphin and Wii/gamecube is quite limited. I started learning only yesterday how some things work in Dolphin and wii shaders.

But I'm quite good in Linux/android kernel development. Smile
So mostly C. Useless for Dolphin.
Win 10, Dolphin 5.0-1905.
i7-5820K, 16GB DDR4, AMD R9 280x DC2T.
Find
Reply
02-04-2017, 11:04 AM
#177
CTCaer Offline
Νostalgic gamer
***
Posts: 72
Threads: 2
Joined: Jan 2017
Hmmm I did the more TEV stages way and also made the newer bigger brightness of the effect, the same with original.

It turned out pretty nice and sweet.
It went from this[Image: blurMethod02.png] to this [Image: blurMethod03.png]
Win 10, Dolphin 5.0-1905.
i7-5820K, 16GB DDR4, AMD R9 280x DC2T.
Find
Reply
02-04-2017, 08:35 PM (This post was last modified: 02-04-2017, 08:35 PM by StripTheSoul.)
#178
StripTheSoul Offline
YouKittenMe?
*******
Posts: 4,617
Threads: 37
Joined: Oct 2009
Yeah, that's definitely an improvement Smile
Intel i5-4690k (Devil's Canyon) @ 3.5 GHz (+Scythe Mugen) / Gainward GTX 1070 Phoenix (OC'd) / ASUS Z97 PRO GAMER / 16GB G.Skill DDR3-2400 CL10 TridentX / X-Fi XtremeMusic / Win10 Pro 64bit / Dell S2716DG Monitor / 3x original WiiMote+MotionPlus+Nunchuk
Find
Reply
02-04-2017, 11:00 PM
#179
CTCaer Offline
Νostalgic gamer
***
Posts: 72
Threads: 2
Joined: Jan 2017
Here's how it looks like:

[Image: SF8P01-64.png] [Image: SF8P01-74.png]

The end result uses 8 TEV stages.

Still didn't figured out how to auto change them..
Win 10, Dolphin 5.0-1905.
i7-5820K, 16GB DDR4, AMD R9 280x DC2T.
Find
Reply
02-05-2017, 12:00 AM
#180
StripTheSoul Offline
YouKittenMe?
*******
Posts: 4,617
Threads: 37
Joined: Oct 2009
Yeah, that's sweet. What do you mean by 'auto change'? Getting it to work for the rest of the game?
Intel i5-4690k (Devil's Canyon) @ 3.5 GHz (+Scythe Mugen) / Gainward GTX 1070 Phoenix (OC'd) / ASUS Z97 PRO GAMER / 16GB G.Skill DDR3-2400 CL10 TridentX / X-Fi XtremeMusic / Win10 Pro 64bit / Dell S2716DG Monitor / 3x original WiiMote+MotionPlus+Nunchuk
Find
Reply
« Next Oldest | Next Newest »
Pages (22): « Previous 1 ... 16 17 18 19 20 ... 22 Next »
Jump to page 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 2 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode