nilv:: the Nil model is now changeable

This commit is contained in:
Zeno Rogue committed 2023-01-30 00:02:13 +01:00
1 parent 80c0b4bb0c
commit 395cbf3668
5 files changed
+110 -37

No files matched your search

+2 -2
View File
@@ -358,7 +358,7 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
break;
#endif
case gcNil:
vsh += nilv::nilshader;
vsh += nilv::nilshader();
break;
case gcSL2:
vsh += slr::slshader;
@@ -441,7 +441,7 @@ shared_ptr<glhr::GLprogram> write_shader(flagtype shader_flags) {
if(nil && pmodel == mdPerspective) {
vsh += "uniform mediump float uRotCos, uRotSin, uRotNil;\n";
coordinator +=
"t.z += (uRotCos * t.x + uRotSin * t.y) * (uRotCos * t.y - uRotSin * t.x) * uRotNil / 2. - t.x * t.y / 2.;\n";
"t.z += (uRotCos * t.x + uRotSin * t.y) * (uRotCos * t.y - uRotSin * t.x) * uRotNil / 2. - " + glhr::to_glsl(nilv::model_used) + " * t.x * t.y / 2.;\n";
}
if(!skip_t) {