supertuxkart / stk-code

The code base of supertuxkart
Other
4.53k stars 1.06k forks source link

Optimized splatting proposal #2704

Open MatthewsSam opened 7 years ago

MatthewsSam commented 7 years ago

Several people mentioned the idea of deleting the splatting because no track except the overworld is using it.

My main reason for not using it is because it kills performances. Currently the shader does a lot of texture reads (6 in total) which is particularly costly for the GPU.

My proposal is to reduce the number of textures that can blend together. In 90% of cases we just want a smooth transition between 2 textures, like grass and rocks, or sand and gravel.

Change the shader to only support 2 textures blending together which would cut in half the texture read instruction. A lot of shaders already read 2 or 3 textures without too much issue.

auriamg commented 7 years ago

A new version of the overworld will be required before we can change the splatting shader, as the current overworld relies on splatting

deveee commented 7 years ago

STK editor uses splatting texture too.

qwertychouskie commented 6 years ago

This can probably be closed with the new shader system; now each track can have its own shaders for its use.