mirror of
https://github.com/open-goal/jak-project
synced 2026-05-29 08:43:08 -04:00
2fa4a23ea1
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.
38 lines
945 B
C++
38 lines
945 B
C++
#pragma once
|
|
|
|
#include <set>
|
|
#include <string>
|
|
#include <unordered_map>
|
|
#include <vector>
|
|
|
|
#include "common/common_types.h"
|
|
#include "common/util/FileUtil.h"
|
|
|
|
namespace decompiler {
|
|
struct TextureDB {
|
|
struct TextureData {
|
|
u16 w, h;
|
|
std::string name;
|
|
u32 page;
|
|
std::vector<u32> rgba_bytes;
|
|
u32 num_mips = -1;
|
|
};
|
|
|
|
std::unordered_map<u32, TextureData> textures;
|
|
std::unordered_map<u32, std::string> tpage_names;
|
|
std::unordered_map<std::string, std::set<u32>> texture_ids_per_level;
|
|
|
|
void add_texture(u32 tpage,
|
|
u32 texid,
|
|
const std::vector<u32>& data,
|
|
u16 w,
|
|
u16 h,
|
|
const std::string& tex_name,
|
|
const std::string& tpage_name,
|
|
const std::vector<std::string>& level_names,
|
|
u32 num_mips);
|
|
|
|
void replace_textures(const fs::path& path);
|
|
};
|
|
} // namespace decompiler
|