mapping efficiency/ game performance and shaders


(]UBC[ McNite) #1

This is one for the pro’s :smiley: no tsakali-explanations plz :bump: (no offense meant tsakali)

When i m doing a new map, what is more efficient in your experience, and what is better for game performance:

a) pick all the textures u want that ET ships from the different shaders (which means your map will need tons of shaders to relate to) and do only the custom shaders in your mymap-shaderfile, or
b) write all the shaders yourself (which means tons of work first, but your map only needs to relate to like 2-3 shader files) and don’t pick any from the ET shader folders

As it seems you write all the important shaders yourself anyways (sky, water, fog etc.) and you ll get a bit of structure into your texture window, b) might be a bit of work at the start, but looking at River II Redux i had like 35-40 % custom shaders anyways. And this might save a lot of time later on. For Redux for example I wrote the shaders for 7 doors myself naming them door1, door2… It simply freaked me out that i had to scroll up and down all the way in the tex window to find them, eventually.

So do you guys have any experience/knowledge on what b) might give for game performance? I know in r_speeds the shaders get counted too (not sure what exactly gets counted though).


(SCDS_reyalP) #2

a) pick all the textures u want that ET ships from the different shaders (which means your map will need tons of shaders to relate to) and do only the custom shaders in your mymap-shaderfile, or

:???:
I don’t understand what you mean by “tons of shaders to relate to”

I certainly don’t see any reason to re-name shaders that are already defined in pak0.


(]UBC[ McNite) #3

Well if you pick the door from the Assault shader, and then 2 doors from some desert shader, and then one door from a castle/chateau shader, you already relate to 4 different shader files just for the doors.
In my example all those shaders are in 1 custom shader.

Maybe this needs less resources for the game to calculate?

Anyways, its just an idea that popped into my mind :blah:


(SCDS_reyalP) #4

It shouldn’t be significant. If anything, making your own may be very slightly worse, because the renderer loads all *.shader files (from .pk3 files in the pure list) at startup. Startup means vid_restarts and map changes.


(carnage) #5

if you consider the amount of memory the shaders will take up and the amount of memory the texture they use will take up there not much contest

shaders are great you can use the same image to make loads of different surfaces will not increasing the amount of memeory needed for the images

the best example i can think of is the head textures in ET

10 images for the heads
5 images for the damage marks

by usining 50 shaders there 15 images can make 50 differnt combinations of heads and damage marks where without 50 individual images would be needed over three times the image memory needed

bottom line… shaders rule… adn they cheap so dont worry unless u got a real performance chrissis