Most efficient method for screen darkening?

I’ve got a scene that is simple enough, that darkening the background color, and ambient light, gives the same results as using a partially transparent black rectangle in the GUI. Which is a more efficient method? Is there a better one still?

Darkening the ambient light will have no impact, whereas the semitransparent rectangle will have a very tiny impact. I wouldn’t sweat it.

I vote for using UnityGUI and a solid black image, then you control the GUI.color (specifically the transparency/alpha info) to get the exact level of darkening you want without tinkering with your scene or its lighting in any way.

That’s my $0.02, even though it may not be worth that much… :stuck_out_tongue: :slight_smile:

…I will say the opposite of what Tom said! :roll:

Specifically, if you know you’re fillrate limited (can easily happen on low end graphics card and devices like iPhone), then do lighting adjustment if you can. Lighting adjustment is more or less free, whereas drawing something over the whole screen needs to draw that many pixels as there are on the screen (couple with something like iPhone being really bad at blending… it could hurt).

Of course, on a decent PC/Mac platform, doing a quad over the screen will probably be not noticeable at all for performance. Unless you’re fillrate limited…

Thanks for the advice, guys!

Considering I’m focusing on iPod development at the moment, I’ll stick with the lighting / color shift for now. Thanks for letting me multiply a Color by a single float instead of having to do it for each channel!

And in nearly all cases I’d say that Aras knows better than I! :smile: