Jump to content
  • entries
    941
  • comments
    5,894
  • views
    870,234

Vegetation Development


Josh

1,734 views

 Share

Today I am happy to say I worked out the problems that the vegetation system prototype had on AMD and Intel graphics. I started by upgrading the system from using texture buffers to using vertex buffers, as recommended in Daniel Rakos' excellent RasterGrid blog. He made this change for speed, but in my case it gave me simpler code I was able to eliminate the OpenGL errors with.

 

The most interesting part of this was discovering the glVertexAttribDivisor command. (Fortunately, it's in the 4.0 spec!) This allows you to set a vertex attribute that only changes per instance instead of per vertex rendered. So in other words you can have a per-instance attribute stored in a vertex buffer...which is completely crazy but very useful in this case.

 

So here is my results on Intel. It's a purely technical shot showing 1.6 million polygons rendered on integrated graphics. There's no billboarding at this time, so it's totally overloading the graphics chip, but the fact this even works is awesome. There's no culling performed on the CPU and no memory usage, so the whole bottleneck is just raw GPU performance. Billboarding will cut the performance demand down so we will have lush vegetation everywhere at very little cost.

 

This was the hard part of developing the system, now it's just a matter of dealing with my own code to finish it out.

 

blogentry-1-0-58957100-1441927840_thumb.jpg

  • Upvote 16
 Share

1 Comment


Recommended Comments

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...