Dolphin, the GameCube and Wii emulator - Forums

Full Version: [UNOFFICIAL] Ishiiruka-Dolphin Custom Version
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806
(02-21-2016, 02:53 PM)shockdude Wrote: [ -> ]Well I attempted to port lanczos4 to Ishiiruka and, uh, got this:

This is at 1x IR. I don't know what I did wrong lol.
I used the libretro implementation and the GeDoSaTo implementation as references. The shader source code is here: http://pastebin.com/eQBLEZ1g

Edit: After poring over the code and doing some experiments, I've come to the conclusion that the shader code is correct, but the coordinate systems that I'm using are wrong.
In fact, if I set stepxy = GetInvTargetResolution()  / 4.0, I get pretty good results out of the shader, but I don't know if it's correct per se.
What exactly do GetInvTargetResolution() and GetInvResolution() return?

I know what's your problem. It's the same problem I'm getting to port my shaders (jinc seems to be so flexible that can overcome it):

Ishiiruka pass some graphics to the shader input framebuffer using Linear Sampling, even when you choose native 1x internal res. For the majority of shaders to work properly, it's mandatory to have access to the RAW native res (that is, all the square pixels at native res).

Your solution using GetInvTargetResolution isn't solving this problem, you are just making your shader pass the linear input directly to the output. What you're getting is indeed a Bilinear output thtough your shader.
(02-21-2016, 08:24 PM)KKLMNNOP Wrote: [ -> ]I don't really know what meaningful detail I can give but basically the custom textures don't load no matter how I configure any Ishiiruka, 520, 554, 560, 565 or the stable version.

With ''Prefetch Custom Textures'' enabled and the texture packs in the right place,
I get ''Custom Textures loaded, 0.0 MB in 0.0 s''.

I also tried deleting every trace of Dolphin and only testing with a single version of Ishiiruka.

All my drivers are definitely up to date and I just did a clean install of Windows 10 a few weeks ago.

Really lost here, the only thing that i can tell you is that you do a doble check on the game itself to be sure thet the id is correct. Apart from that everything else seems to be correct.
(02-21-2016, 06:30 PM)kirbypuff Wrote: [ -> ]@Hyllian:

What we need is these shaders ported to Ishiiruka:

For 2D image enhancement/upscaling
----------------------------------------
* CRT-Caligari
* CRT-Hyllian
* CRT-Lottes
CRT-caligari is soooo old. The best ones in Retroarch are these: crt-geom, crt-hyllian, crt-easemode and crt-lottes. The best one and accurate is crt-royale, but it is so complex it runs slow and is only recommended for 4k displays, so I think it's overkill for Ishiiruka for now.

(02-21-2016, 06:30 PM)kirbypuff Wrote: [ -> ]* 6xBR and 6xBR-v3.7c+CRT (v3.7c looks best when combined with a CRT shader)

- More CRT shaders, because DolphinFX is bulky and *super slow*. DolphinFX Scanlines + Barrel Distortion also doesn't produce a very good CRT effect.
- 6xBR, because 5xBR is not enough for high-res displays.

About your 6xBR request, I need to clarify some things: you're talking about the legacy xbr shaders. They're outdated right now on Retroarch. Some time ago I figured out how to make xBR scale-agnostic, which means it can upscale to any size, no need to NxBR, now it's just xBR. So now I have these kinds of xBR shaders:

xbr-lvl1-noblend.cg (It replace the legacy 3.7 LV1 shaders)
--------------

The most basic xBR shader. Level 1 means it only detects two edge directions (45 and 135 degrees). The interpolation doesn't blend pixel colors. It uses the most similar color from one of its neighbors. So, the final result uses the original color palette. And because of that, it only works properly at odd scale factors (3x, 5x, 7x...).

Recommended sampling: `Point`
Recommended scale factors: `multiple odd scale factors`

xbr-lvl2-noblend.cg (It replace the legacy 3.7 LV2 shaders)
--------------

An evolution from last shader. Level 2 means it can detect four edge directions, which shows as better rounded objects on screen. The interpolation doesn't blend pixel colors. It uses the most similar color from one of its neighbors. So, the final result uses the original color palette. And because of that, it only works properly at odd scale factors (3x, 5x, 7x...).

Recommended sampling: `Point`
Recommended scale factors: `multiple odd scale factors`

xbr-lvl2.cg (It replace the legacy 3.8 LV2 shaders)
--------------

It can detect four edge directions, which shows as better rounded objects on screen. The interpolation blends pixel colors, so that the final image is smoother than the noblend versions. It works well in any integer scale factor.

Recommended sampling: `Point`
Recommended scale factors: `Integer multiples` <-- See! It's scale agnostic!

xbr-lvl2-fast.cg (A fast alternative to xbr-lv2, though a bit less accurate)
--------------

This is a simplified lvl2 implementation. Much faster than the standard version, though it sacrifices some quality.

Recommended sampling: `Point`
Recommended scale factors: `Integer multiples`

xbr-lvl3-noblend.cg
--------------

Level 3 means it can detect six edge directions, which shows as better rounded objects on screen. The interpolation doesn't blend pixel colors. It uses the most similar color from one of its neighbors. So, the final result uses the original color palette. And because of that, it only works properly at odd scale factors (3x, 5x, 7x...).

Recommended sampling: `Point`
Recommended scale factors: `multiple odd scale factors`


Other than those, there are the multipass versions of them, up to lv4.

So, a simple xBR-LV2 would fullfill your need for a 6xBR. That's the shader I'm trying to port to Ishiiruka, but I'm having problems yet.

(02-21-2016, 06:30 PM)kirbypuff Wrote: [ -> ]For downsampling (from GeDoSaTo/madVR/MPC-HC)
--------------------------------------------------------
* Lanczos3 & Lanczos4 (with adjustable deringing fllter)
* Bicubic (with adjustable sharpness from 0 to 100)
* Catmull-Rom AR
Actually, though those lanczos are called 3 and 4, they're indeed 2-taps only.

Catmull-Rom is just a special configuration of a more general Bicubic implementation. I have one bicubic shader in Retroarch with some internal params that can be adjusted to work like catmul-rom and other known cubic spline configs.
Tino,

When you set Dolphin to native 1x res of 640x528, what's the resolution of the framebuffer it uses to put 'in' the dolphin screen?

Normally on other emulators it is a PoT framebuffer. So, for 640x528, other emulators would create a framebuffer of 1024x1024. What happen in Ishiiruka?
@Hyllian: in dophin the framebufferr size is a multiple of the real efb size so you start with 640x528 at 1x, 1280x1056 at 2x, 1920x1584 at 3x ....
If the native res is 640x528, is there any reason why when I use the Screenshot feature, to take a native shot of the game, it takes screenshots at odd sizes like 584x480, or 584x448 in gamecube games (Luigi's Mansion and RER, respectively) and 640x360 in wii games?
because the games do not uses the entire efb to render, every game chooses the resolution at what they whant to render, some games even render half of the screen copy that to one xfb the the other half copy that toa diferent xfb and then the final output to the screen is renderen combining the 2 xfb. sorry if is not clear but wii/gc rendering is a little complex but powerfull.
So, the hypothesis of Dolphin doing Linear sampling at some sprites/textures before feeding shaders is the most probable. If yes, this is breaking the efficiency of most common shaders.
(02-21-2016, 10:06 PM)Hyllian Wrote: [ -> ]I know what's your problem. It's the same problem I'm getting to port my shaders (jinc seems to be so flexible that can overcome it):

Ishiiruka pass some graphics to the shader input framebuffer using Linear Sampling, even when you choose native 1x internal res. For the majority of shaders to work properly, it's mandatory to have access to the RAW native res (that is, all the square pixels at native res).

Your solution using GetInvTargetResolution isn't solving this problem, you are just making your shader pass the linear input directly to the output. What you're getting is indeed a Bilinear output thtough your shader.
And you're saying Dolphin/Ishiiruka currently can't pass the native internal res to a shader?
(02-22-2016, 01:54 AM)shockdude Wrote: [ -> ]And you're saying Dolphin/Ishiiruka currently can't pass the native internal res to a shader?

I don't know about the inner workings of Dolphin/Ishiiruka, so take that with a grain of salt. What I'm saying is just based on the behavior of these shaders. They behave as if the input texture isn't native. It seems like Ishiiruka is prefiltering the input before passing to the shaders. It's that or we are getting some wrong param. Your lanczos port is correct, I compared with the version in GedoSato and Retroarch, the sources are the same. Why only Ishiiruka doesn't output correct filtering, then?

Look at these two screenshots I got using Ishiiruka. I configured it to native 1x internal res and checked the option 'Auto adjust Window size', so that it runs in a Window and its size will always adjust to the internal res (even if it changes in real time). It's using the shader nearest-neighbor.glsl.

[attachment=14414]

[attachment=14415]

Can you see distortions there??

Now this from Luigi's Mansion:

[attachment=14416]

Zoomed 2x for you to see the distortions:

[attachment=14417]
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806