[jak 2] ETIE (#2326)

Definitely needs a clean up pass, but I think the functionality is very
close.

There's a few "hacks" still:
- I am using the emerc logic for environment mapping, which doesn't care
about the length of the normals. I can't figure out how the normal
scaling worked in etie. I want to do a little bit more experimentation
with this before merging.
- There is some part about adgifs for TIE and ETIE that I don't
understand. The clearly correct behavior of TIE/ETIE is that the alpha
settings from the adgif shader are overwritten by the settings from the
renderer. But I can't figure out how this happens in all cases.
- Fade out is completely disabled. I think this is fine because the
performance difference isn't bad. But if you are comparing screenshots
with PCSX2, it will make things look a tiny bit different.
This commit is contained in:
water111
2023-03-17 20:35:26 -04:00
committed by GitHub
parent 6670124296
commit 2fa4a23ea1
41 changed files with 9101 additions and 858 deletions
+7 -1
View File
@@ -107,6 +107,13 @@ TEST(VuDisasm, Tie_Jak2) {
EXPECT_EQ(disasm.to_string(prog), get_expected("jak2/tie"));
}
TEST(VuDisasm, etie_Jak2) {
auto data = get_test_data("jak2/etie-vu1");
VuDisassembler disasm(VuDisassembler::VuKind::VU1);
auto prog = disasm.disassemble(data.data(), data.size() * 4, false);
EXPECT_EQ(disasm.to_string(prog), get_expected("jak2/etie-vu1"));
}
TEST(VuDisasm, SpriteDistort) {
auto data = get_test_data("sprite-distort");
VuDisassembler disasm(VuDisassembler::VuKind::VU1);
@@ -146,7 +153,6 @@ TEST(VuDisasm, ForegroundVu0_Jak2) {
auto data = get_test_data("jak2/foreground-vu0");
VuDisassembler disasm(VuDisassembler::VuKind::VU0);
auto prog = disasm.disassemble(data.data(), data.size() * 4, false);
// fmt::print("{}\n", disasm.to_string(prog));
EXPECT_EQ(disasm.to_string(prog), get_expected("jak2/foreground-vu0"));
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -111,7 +111,7 @@ void runtime_no_kernel_jak1() {
const char* argv[argc] = {"", "-fakeiso", "-debug", "-nokernel", "-nosound"};
GameLaunchOptions game_options;
game_options.disable_display = true;
exec_runtime(game_options, argc, const_cast<char**>(argv));
exec_runtime(game_options, argc, argv);
}
void runtime_no_kernel_jak2() {
@@ -120,7 +120,7 @@ void runtime_no_kernel_jak2() {
GameLaunchOptions game_options;
game_options.disable_display = true;
game_options.game_version = GameVersion::Jak2;
exec_runtime(game_options, argc, const_cast<char**>(argv));
exec_runtime(game_options, argc, argv);
}
void runtime_with_kernel_jak1() {
@@ -128,7 +128,7 @@ void runtime_with_kernel_jak1() {
const char* argv[argc] = {"", "-fakeiso", "-debug", "-nosound"};
GameLaunchOptions game_options;
game_options.disable_display = true;
exec_runtime(game_options, argc, const_cast<char**>(argv));
exec_runtime(game_options, argc, argv);
}
void runtime_with_kernel_jak2() {
@@ -137,7 +137,7 @@ void runtime_with_kernel_jak2() {
GameLaunchOptions game_options;
game_options.disable_display = true;
game_options.game_version = GameVersion::Jak2;
exec_runtime(game_options, argc, const_cast<char**>(argv));
exec_runtime(game_options, argc, argv);
}
void runtime_with_kernel_no_debug_segment() {
@@ -145,7 +145,7 @@ void runtime_with_kernel_no_debug_segment() {
const char* argv[argc] = {"", "-fakeiso", "-debug-mem", "-nosound"};
GameLaunchOptions game_options;
game_options.disable_display = true;
exec_runtime(game_options, argc, const_cast<char**>(argv));
exec_runtime(game_options, argc, argv);
}
void createDirIfAbsent(const std::string& path) {