Grass impostor billboards update


Recommended Posts


Updating from 2.6 way up to 2.11 we've encountered several issues with visuals based on grass_impostor_base.basemat:


The most important one was that now billboards are half buried in the ground. By comparing the shaders I can see a difference in the way billboard vertices are positioned vertically, mainly this line (in core\shaders\grass\impostor\vertex\common.h): += binormal * ((in_data.texcoord.y - 0.5f) * height);

which, if converted to: += binormal * ((in_data.texcoord.y) * height);

produces the same results as 2.6, as this older version has it as: -= binormal * (IN_ATTRIBUTE(3).y * height);

Is this a breaking change? How to counter act this, by using the pivot_offset? But this is in world space?



New material parameters were added at one point (2.7): phi and theta with default values 8 and 4. Previously you had impostor_transform (4 floats) with default values 8, 2, 0, 0). So second parameter didn't matched.

The update scripts didn't made the change (it just removed impostor_transform parameter without inserting phi and theta), had to manually track the error and update the materials.


Kind Regards,

Adrian L.

Link to post

Hi, ok thank you, will let our content devs use that tool and see if it fixes all issues.

I also noticed that after the world hierarchy xml content was updated, the prefab_id and linked_to_prefab_id attributes are no longer present (as they were present in 2.6 and 2.11 is no longer use those). Are these something I need to worry about?

Link to post

Not really. That was initial step that should ease migration to the new prefab system (which was later cancelled). So removing this will not break anything.

How to submit a good bug report
FTP server for test scenes and user uploads:

Link to post