Just spent 5 hours debugging some weird “quirks” in my rendering, which looked more and more like my 0.000001 NearClip setting was behaving as 0.01 instead. Well guess what? The MIN value for NearClip is 0.01. I never thought to check that this value was actually being set to my fully legitimate value of 0.00001, and so spent hours trying to figure out what I was messing up in my shaders or code.
In our Map application scene, since we show a World Map, it was very nice to have “1 Unit = 1 Degree” (which is about 60 miles!). So our scene was just dealing mostly with small values, but the Unit size was meaningful for this context. The world map was exactly 360 units (i.e. “degrees” wide).
The rest of our app already thinks in terms of “Degrees”, so this really just made sense for us.
Unfortunately, though, 0.01 unit for us equates to about 3600 feet! When in Ground Mode, that’s where the 0.01 near plan clipping was horrid… clipping everything closer than 3600 feet. Ouch. That’s awful for a cockpit view.
I wish Urho hadn’t implemented this unnecessary/arbitrary Minimum NearClip value.
As a result, we’re forced to use a 100,000 conversion factor, so that 100,000 units is now 1 degree. And to convert between Urho WorldSpace and the rest of our app, we now need to employ this conversion factor. All because Urho decided to artificially limit our NearClip to 0.01 minimum.
Just airing a complaint. And also hoping that maybe this post will help prevent others from running into this same issue. And maybe this post might inspire Urho team to remove this Minimum (probably not, but worth a shot).