parse abr from PS 2018, restore xmp injection, check uniform hash collision
This commit is contained in:
@@ -394,3 +394,60 @@ void ShaderManager::invalidate()
|
||||
{
|
||||
m_shaders.clear();
|
||||
}
|
||||
|
||||
bool check_uniform_uniqueness()
|
||||
{
|
||||
std::vector<uint16_t> v = {
|
||||
const_hash("mvp"),
|
||||
const_hash("tex"),
|
||||
const_hash("tex_alpha"),
|
||||
const_hash("tex_fg"),
|
||||
const_hash("tex_bg"),
|
||||
const_hash("tex_mix"),
|
||||
const_hash("tex_mix_alpha"),
|
||||
const_hash("tex_mask"),
|
||||
const_hash("tex_dual"),
|
||||
const_hash("tex_stroke"),
|
||||
const_hash("tex_pattern"),
|
||||
const_hash("pattern_offset"),
|
||||
const_hash("pattern_alpha"),
|
||||
const_hash("mix_alpha"),
|
||||
const_hash("opacity"),
|
||||
const_hash("wet"),
|
||||
const_hash("lock"),
|
||||
const_hash("col"),
|
||||
const_hash("tof"),
|
||||
const_hash("tsz"),
|
||||
const_hash("alpha"),
|
||||
const_hash("mask"),
|
||||
const_hash("resolution"),
|
||||
const_hash("highlight"),
|
||||
const_hash("blend_mode"),
|
||||
const_hash("dual_blend_mode"),
|
||||
const_hash("noise"),
|
||||
const_hash("dir"),
|
||||
const_hash("use_dual"),
|
||||
const_hash("use_pattern"),
|
||||
const_hash("light_dir"),
|
||||
const_hash("mode"),
|
||||
const_hash("ambient"),
|
||||
const_hash("pattern_invert"),
|
||||
const_hash("pattern_scale"),
|
||||
const_hash("pattern_bright"),
|
||||
const_hash("pattern_contr"),
|
||||
const_hash("pattern_depth"),
|
||||
const_hash("patt_blend_mode"),
|
||||
const_hash("colorize"),
|
||||
const_hash("dual_alpha"),
|
||||
const_hash("draw_on_screen"),
|
||||
};
|
||||
std::sort(v.begin(), v.end());
|
||||
int last = 0;
|
||||
for (auto o : v)
|
||||
{
|
||||
if (o == last)
|
||||
return false;
|
||||
last = o;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user