Thứ Tư, 25 tháng 9, 2013

Wednesday Woes

It's Not All Cherries and Cream

A pretty 'orrid day really. Started good with some clean-up of the shadows and optimizations  and then came the re-integration of the color maps. This was when the dreaded performance monster caught up with me. I have escaped the beast for many a moon, but today it found me.

Turns out rendering the whole terrain in full polygon glory twice is a little too much for my graphics card and my FPS dropped to 43 fps. Completely unacceptable considering other parts of the engine where not engaged. Not sure the cause, but my first guess is that rendering that many polygons twice was too much, and that subtle use of a pixel shader is the solution out of this.  It could also be something silly, and not the first time, but for tonight and my frazzled brain, I do not know which.

Solutions Pending

I have a few ideas how to get around this one, but really the main idea was to double up on my texture slots and get the job done. Turns out I cannot do that without a 'significant' performance thump. One idea is to use more than eight texture slots, limiting the cards Reloaded could run on. Another is to create texture plates with four texture patterns and normals on them, therefore staying within the eight texture slots limit, but requiring some fiendish texture wrapping math in the pixel shader. A third option is to drop normal maps and shadows altogether and move on. A forth is to somehow have a 'shadow shader' which can overlay the established terrain surface. In fact there are as many solution as I could dream up, but I need one that I can code within the day, will perform at top speed and fit nicely with that I have already coded.  The life of a coder is never dull!

Pre-beta 'don't look if your name is Rick' Screenshot

So you don't feel too dejected, and not wishing to share my pain, here is a nice screenshot from my horrid proto with the color stripped out. As you can see, nice shadows and normals under the colored vegetation, and the vegetation being shadowed too which was no small feat! Also shadows spanning off into the distance, you can't see this, also no small feat!


I had hoped to show you a full color screenshot or even video of the shadows in all their glory, but not at 43 fps!!  No Sir!

Signing Off

I either need to find the route cause of this performance hog when rendering the full screen terrain twice, or find a new way to have colored textures, normals, veg map and cascade shadow maps all in the same shader pass.  No one will thank me for pretty visuals and horrid performance, so this needs solving right now or we have to back track on our visual ambitions!  Fear not, it's me we're worrying over, and I usually find a solution, eventually ;)

Không có nhận xét nào:

Đăng nhận xét