Jump to content
  • Advertisement
Sign in to follow this  
Jocose

Batch Rendering Confusion

This topic is 3084 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

First let me point out that I'm an artist who only dabbles in graphics programming. I know how to write basic HLSL, but I am by no means a programmer. I'm trying to figure out how to best build assets for the engine we are working with which uses Batch Rendering. Basically I have two buildings that share 4 textures, but that each have 1 texture unique to them (an ambient occlusion map). I am wondering how the introduction of the ambient occlusion texture into the mix affects performance. What I am basically asking is that do I lose the performance benefit of batch rendering if all my textures in a material are not identical? I know this is a really basic question to be posting on a programming forum, but I figured this community would probably be a good place to find an answer. Thanks in advance for any help :) description of your image

Share this post


Link to post
Share on other sites
Advertisement
The answer is "probably" :)

If using DX10 or later, textures can be indexed so you could reference both the AO maps from the one shader which keeps you able to render multiple building instances with one draw call and some halfway clever setup.

Chances are higher though that your engine won't support this (If WinXP, then DX9, then no texture indexing) but you can still get multiple instances from one draw call if you can put both AO maps into the same texture and reference them differently (ie using a vertex component as a UV offset in the second building.

All of the above requires setup code in the program, so if you're not been told about this then you're probably not gonna get it tbh. Either that or your programmer needs to learn how to spec out art rules better. :)

The simplest system would indeed require a drawcall per building with totally separate textures as you intimate. And given what I said in the previous paragraph this is probably the system you end up with. Unless you're rendering 100's of buildings though, I doubt it will be a problem.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!