TheZoq2 / dcs_on_linux

Instructions for running DCS World on linux. Mostly extracted from https://github.com/ValveSoftware/Proton/issues/1722
79 stars 4 forks source link

The F16 RWR issue #1

Open TheZoq2 opened 3 years ago

TheZoq2 commented 3 years ago

RWR rendering on the F16 is currently broken. A fix was suggested by https://github.com/ValveSoftware/Proton/issues/1722#issuecomment-746417677

I made some further testing and came up with some things.

Never mind, after investigating things a bit more, it looks like the RWR problem at least is related to textures or texture coordinates.

The offending line is the symbol.material = "INDICATIOn_RWR", which from reading materials.lua in the F16/Cockpit/Scripts folder reads sets the texture to ResourcesPath.."RWR/indication_RWR.tga. Reading the logs, this is one of the files which yield a "invalid parameter" error:

2020-12-16 16:34:52.236 ERROR DX11BACKEND: Can't load image './Mods/aircraft/F-16C/Cockpit/Scripts/../IndicationResources/RWR/indication_RWR.tga'. Reason: Invalid parameter.

Though this is also the case for the file which gets loaded if alternative line material is used. Just for fun, I decided to try to modify that file, and this is the result:

image

With the file replaced by this:

image

Now that I think about it, this corresponds to the original image, image

Which renders the corner of the image.

Setting the constants in the tex_params array seems to have no effect. on the output. Setting the side variable to 1.0 shows 4 copies of the image centered around the radar contact like so

image

After all this testing, I ended up re-exporting the indication_RWR.tga file using gimp which solved the issue. Looks like something causes that file to be read without transparency.

I believe this is related to the Invalid Parameter errors we get in the log files when loading textures. As far as I can tell, the gimp export solved that issue. However, the error is also present for files which render fine, like the arcade.tga above.