Wrong PBR texture colors in 3d weapon models

Need help running various source ports? Did your computer break? Ask here.

Moderators: GZDoom Developers, LZDoom Developers, UZDoom Developers

Forum rules
Please be as descriptive as possible in your posts (list your hardware and operating system, the version of the source port you are using, any mods you are running and how they're being loaded, etc.)
This will help others to give you a solution!
Hashi
Posts: 1
Joined: Wed Nov 20, 2024 10:07 am
Operating System Version (Optional): win11
Graphics Processor: nVidia with Vulkan support

Wrong PBR texture colors in 3d weapon models

Post by Hashi »

I'm using my own 3d weapon models and for the longest time I had this issue with wrong PBR colors.
In the attached screenshot you can see that the PBR shader makes the intense blue light RED unlike the specular shader that works properly.

With trial and error I was able to mitigate this by removing the kD multiplier from the material_pbr.fp (gzdoom.pk3), apparently that coeff causes the red tint in this particular case (on other models the color was different, usually on metallic parts).

//vec3 ambient = (kD * diffuse) * ao;
vec3 ambient = diffuse * ao; // <-- my fix

Here you can download the example mod to try it. Pistol is PBR(wrong) and fist is Specular(ok)
https://drive.google.com/file/d/1Ukrw9B ... drive_link
You do not have the required permissions to view the files attached to this post.

Return to “Technical Issues”