-
Notifications
You must be signed in to change notification settings - Fork 358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 'no specular' support #254
Conversation
Light entities can have the param 'nospecular' set, which skips the specular lighting. However this never actually worked in Doom 3. This fix addresses that. Using IceColdDuke's PBR interaction shader (which exposes the problem clearly), this is without the fix: https://imgur.com/lIst0NA With the fix applied: https://imgur.com/qO0m34V
Somehow all the tabs used for indentation have been replaced with spaces, which makes it hard to tell what has actually changed in that function (vs what is just indented differently). It also makes the code look inconsistent in the editor and Can you try keeping the original indentation style? |
Also, doesn't this change the look of the original game? |
Ahh, the tabs > spacing thing might be related to my text editor. Afaik it doesn't affect the base game at all. If they actually used nospecular anywhere, they were bound to notice it didn't work, right? |
There's 30 maps that contain |
Then dismiss the patch. One could argue that the patch makes Doom3 look like the developers intended, though? |
Maybe there's a way to make sure it's only applied for new maps (where we can assume they have been tested with the fix applied and thus look as intended)? |
That could be a good solution, yes |
A better approach might be to control it via a cvar? |
Why do you think that would be better? |
The idea of a worldpsawn flag is great. I would also add a cvar (disabled by default) to enable the correct behavior of this feature in the entire game. |
based on dhewm#254 The "nospecular" parm will only be used if either r_supportNoSpecular is set to 1 or r_supportNoSpecular is set to -1 (the default) and the maps spawnargs contain "allow_nospecular" "1"
@Arl90 @EoceneMiacid Is anyone still interested in this? If so, see #643 |
based on dhewm#254 The "nospecular" parm will only be used if either r_supportNoSpecular is set to 1 or r_supportNoSpecular is set to -1 (the default) and the maps spawnargs contain "allow_nospecular" "1" This probably doesn't work with (time)demos yet, because I think when they're being played I can't access the worldspawn entity
Light entities can have the param 'nospecular' set, which skips the specular lighting.
However this never actually worked in Doom 3.
This fix addresses that.
Using IceColdDuke's PBR interaction shader (which exposes the problem clearly), this is without the fix: (nospecular is set on the laser, yet they are still generated, hence the strange lighting around the laser dot)
https://imgur.com/lIst0NA
With the fix applied (specular lights are properly skipped)
https://imgur.com/qO0m34V