1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-10-31 19:36:16 +00:00

added comments for sl:: parameters, set them as param_, renamed steps to shader_iterations

This commit is contained in:
Zeno Rogue 2022-05-28 18:43:43 +02:00
parent 9c1dd1088b
commit 4892541287
3 changed files with 8 additions and 6 deletions

View File

@ -952,8 +952,8 @@ EX void initConfig() {
addsaver(sn::solrange_xy, "solrange-xy"); addsaver(sn::solrange_xy, "solrange-xy");
addsaver(sn::solrange_z, "solrange-z"); addsaver(sn::solrange_z, "solrange-z");
#endif #endif
addsaver(slr::steps, "slr-steps"); param_i(slr::shader_iterations, "slr-steps");
addsaver(slr::range_xy, "slr-range-xy"); param_f(slr::range_xy, "slr-range-xy");
param_f(arcm::euclidean_edge_length, "arcm-euclid-length"); param_f(arcm::euclidean_edge_length, "arcm-euclid-length");
@ -1399,9 +1399,9 @@ EX void edit_sightrange() {
dialog::add_action([] { dialog::add_action([] {
dialog::editNumber(slr::range_xy, 0, 10, 0.5, 4, XLAT("max difference in X/Y coordinates"), ""); dialog::editNumber(slr::range_xy, 0, 10, 0.5, 4, XLAT("max difference in X/Y coordinates"), "");
}); });
dialog::addSelItem(XLAT("steps"), its(slr::steps), 'z'); dialog::addSelItem(XLAT("shader_iterations"), its(slr::shader_iterations), 'z');
dialog::add_action([] { dialog::add_action([] {
dialog::editNumber(slr::steps, 0, 50, 1, 10, "", ""); dialog::editNumber(slr::shader_iterations, 0, 50, 1, 10, "", "");
}); });
} }
if(vid.use_smart_range && WDIM == 2) { if(vid.use_smart_range && WDIM == 2) {

View File

@ -1690,8 +1690,10 @@ EX }
EX namespace slr { EX namespace slr {
/** in what range are we rendering H2xR */
EX ld range_xy = 2; EX ld range_xy = 2;
EX int steps = 15; /** the number of steps for inverse_exp in the shader */
EX int shader_iterations = 15;
EX transmatrix translate(hyperpoint h) { EX transmatrix translate(hyperpoint h) {
return matrix4( return matrix4(

View File

@ -570,7 +570,7 @@ void display_data::set_projection(int ed, ld shift) {
if(selected->uIterations != -1) { if(selected->uIterations != -1) {
glhr::set_index_sl(0); glhr::set_index_sl(0);
glhr::set_sv(stretch::not_squared()); glhr::set_sv(stretch::not_squared());
glhr::set_sl_iterations(slr::steps); glhr::set_sl_iterations(slr::shader_iterations);
} }
glhr::new_projection(); glhr::new_projection();