diff --git a/pandatool/src/pfmprogs/pfmTrans.cxx b/pandatool/src/pfmprogs/pfmTrans.cxx index a288934d17..0a63ad4dbb 100755 --- a/pandatool/src/pfmprogs/pfmTrans.cxx +++ b/pandatool/src/pfmprogs/pfmTrans.cxx @@ -85,6 +85,11 @@ PfmTrans() { "3-d depth values encoded in the texture coordinates.", &PfmTrans::dispatch_none, &_got_vis_inverse); + add_option + ("vis2d", "", 60, + "Respect only the first two components of each depth value, ignoring z.", + &PfmTrans::dispatch_none, &_got_vis_2d); + add_option ("vistex", "texture.jpg", 60, "Specifies the name of the texture to apply to the visualization.", @@ -129,6 +134,7 @@ bool PfmTrans:: process_pfm(const Filename &input_filename, PfmFile &file) { file.set_zero_special(_got_zero_special); file.set_vis_inverse(_got_vis_inverse); + file.set_vis_2d(_got_vis_2d); if (_got_resize) { file.resize(_resize[0], _resize[1]); diff --git a/pandatool/src/pfmprogs/pfmTrans.h b/pandatool/src/pfmprogs/pfmTrans.h index 4bafd55c44..f0777e1d88 100755 --- a/pandatool/src/pfmprogs/pfmTrans.h +++ b/pandatool/src/pfmprogs/pfmTrans.h @@ -54,6 +54,7 @@ private: bool _got_reverse; bool _got_zero_special; bool _got_vis_inverse; + bool _got_vis_2d; bool _got_resize; int _resize[2];