1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-12-16 11:08:05 +00:00

semidirect rendering

This commit is contained in:
Zeno Rogue
2023-05-15 02:25:13 +02:00
parent 2e1e14c1a2
commit e6738f6c20
3 changed files with 28 additions and 5 deletions

View File

@@ -32,6 +32,8 @@ constexpr flagtype SF_ORIENT = 16384;
constexpr flagtype SF_BOX = 32768;
constexpr flagtype SF_ZFOG = 65536;
constexpr flagtype SF_ODSBOX = (1<<17);
constexpr flagtype SF_SEMIDIRECT = (1<<18);
#endif
EX bool solv_all;
@@ -236,6 +238,11 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
skip_t = true;
shader_flags |= SF_DIRECT;
}
else if(!vid.consider_shader_projection && semidirect_rendering && models::is_perspective(pmodel)) {
vmain += "// this\n";
distfun = "length(t.xyz)";
shader_flags |= SF_PERS3 | SF_SEMIDIRECT;
}
else if(!vid.consider_shader_projection) {
shader_flags |= SF_PIXELS;
}