Interactive Demo Scene

I just wanted to do something.
It took about a week of evenings.
Assets are not mine.
Beware of heavy GIFs below (up to 40MB).

This is not code exchange.
Re-check your equipement before looking at the code if you are brave enough to even open it.
All sources are here:

Tested only with DX11.
Grass animation works only with DX11.

Assets info is here:


One thing that really bothers me with Urho, but I never found a way to tweak it, is how jaggy vegetation and shadows tends to look like. Is there any config that I’m missing on my materials? Did you manage to find a way to fix it?

There’s one trick that I found helpful and it has nothing to do with Urho.
You should carefully prepare foliage LODs so they doesn’t get too sparse.
In other words, LOD calculation shall be conservative and preserve as much non-transparent pixels as possible…

Alpha to Coverage plus MSAA x4, if properly used, may help too.
It has it’s own issues tho.
It shall be configured more thoughtfully than just turning switches on like I did below, but it’s enough to get an idea:


Looks really great!
Compiled and ran it on Ubuntu 16.04 and everything seems to be working except the grass animations as you already mentioned. I always thought that vegetation was one of the missing samples in this project and it could be great if someday it can be created in the master repo.

BTW it’s quite easy to port grass shaders for OpenGL. Add some attributes, copy paste code… maybe I’ll do it next time when I touch this code.
DX9, on the other hand, doesn’t allow to sample textures in vertex shader and cannot support all these animations.

Are these artifacts caused by bad LODs?


Runs well on a shitty Intel 4th and Ubuntu:


Grass noise appeared when I enabled MSAA, don’t know why. Maybe texture mode was set to wrap implicitly.
Tree model itself is quite strange. It seems it was designed to have one-sided leaves. At least, I had artifacts when made leaf material two-sided. I don’t know.

Cool, how did you port shaders?

Didn’t port anything. Cloned, built and it worked well.