Skip to content
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

Windows build has lighting broken #176

Closed
kortemik opened this issue Oct 11, 2014 · 28 comments
Closed

Windows build has lighting broken #176

kortemik opened this issue Oct 11, 2014 · 28 comments

Comments

@kortemik
Copy link

I compiled latest master HEAD version with Visual Studio 2013 Pro

Here is the binary https://github.com/kortemik/OpenTechEngineBuilds/tree/rbdoom3 and dlls can be found at http://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-2.2.3-win64-shared.7z

rbdoom-3-bfg-20141011-142511-001
rbdoom-3-bfg-20141011-142529-002
rbdoom-3-bfg-20141011-142648-003
rbdoom-3-bfg-20141011-142655-004

It seems that only one side of the light is projected which makes the game very much harder :D however flashlight seems to work as intended.

2694 MHz generic CPU with SSE & SSE2
Winsock Initialized
Found interface: {A876BD64-A53B-4E16-BA1A-B40EF6635822} Killer e2200 P
CI-E Gigabit Ethernet Controller (NDIS 6.20) - 192.168.1.34/255.255.25
5.0
Found interface: {2B827356-982F-494A-8F46-83D35AE0D618} Microsoft Wi-F
i Direct Virtual Adapter - 0.0.0.0 NULL netmask - skipped
Found interface: {CE797F8C-C5D9-4E89-9083-6E1312B76F76} Broadcom 802.1
1ac Network Adapter - 0.0.0.0 NULL netmask - skipped
Found interface: {AB7577EF-253A-46C5-8012-65BC3E575351} LogMeIn Hamach
i Virtual Ethernet Adapter - 25.57.108.243/255.0.0.0
Sys_InitNetworking: adding loopback interface
------ Initializing File System ------
Loaded resource file _common.resources
Loaded resource file _ordered.resources
Loaded resource file _sound_pc.resources
Loaded resource file _sound_pc_en.resources
Loaded resource file maps/admin.resources
Loaded resource file maps/alphalabs1.resources
Loaded resource file maps/alphalabs2.resources
Loaded resource file maps/alphalabs3.resources
Loaded resource file maps/alphalabs4.resources
Loaded resource file maps/caverns1.resources
Loaded resource file maps/caverns2.resources
Loaded resource file maps/comm1.resources
Loaded resource file maps/commoutside.resources
Loaded resource file maps/cpu.resources
Loaded resource file maps/cpuboss.resources
Loaded resource file maps/d3ctf1.resources
Loaded resource file maps/d3ctf2.resources
Loaded resource file maps/d3ctf3.resources
Loaded resource file maps/d3ctf4.resources
Loaded resource file maps/d3dm1.resources
Loaded resource file maps/d3dm2.resources
Loaded resource file maps/d3dm3.resources
Loaded resource file maps/d3dm4.resources
Loaded resource file maps/d3dm5.resources
Loaded resource file maps/d3xpdm1.resources
Loaded resource file maps/d3xpdm2.resources
Loaded resource file maps/d3xpdm3.resources
Loaded resource file maps/d3xpdm4.resources
Loaded resource file maps/delta1.resources
Loaded resource file maps/delta2a.resources
Loaded resource file maps/delta2b.resources
Loaded resource file maps/delta3.resources
Loaded resource file maps/delta4.resources
Loaded resource file maps/delta5.resources
Loaded resource file maps/deltax.resources
Loaded resource file maps/enpro.resources
Loaded resource file maps/erebus1.resources
Loaded resource file maps/erebus2.resources
Loaded resource file maps/erebus3.resources
Loaded resource file maps/erebus4.resources
Loaded resource file maps/erebus5.resources
Loaded resource file maps/erebus6.resources
Loaded resource file maps/hell.resources
Loaded resource file maps/hell1.resources
Loaded resource file maps/hellhole.resources
Loaded resource file maps/le_enpro1.resources
Loaded resource file maps/le_enpro2.resources
Loaded resource file maps/le_exis1.resources
Loaded resource file maps/le_exis2.resources
Loaded resource file maps/le_hell.resources
Loaded resource file maps/le_hell_post.resources
Loaded resource file maps/le_underground.resources
Loaded resource file maps/le_underground2.resources
Loaded resource file maps/mars_city1.resources
Loaded resource file maps/mars_city2.resources
Loaded resource file maps/mc_underground.resources
Loaded resource file maps/monorail.resources
Loaded resource file maps/phobos1.resources
Loaded resource file maps/phobos2.resources
Loaded resource file maps/phobos3.resources
Loaded resource file maps/phobos4.resources
Loaded resource file maps/recycling1.resources
Loaded resource file maps/recycling2.resources
Loaded resource file maps/site3.resources
Current search path:
C:\Users\kordex\Saved Games\id Software\RBDOOM 3 BFG/base
F:\games\SteamLibrary\SteamApps\common\DOOM 3 BFG Edition/base
_common.resources
_ordered.resources
_sound_pc.resources
_sound_pc_en.resources
maps/admin.resources
maps/alphalabs1.resources
maps/alphalabs2.resources
maps/alphalabs3.resources
maps/alphalabs4.resources
maps/caverns1.resources
maps/caverns2.resources
maps/comm1.resources
maps/commoutside.resources
maps/cpu.resources
maps/cpuboss.resources
maps/d3ctf1.resources
maps/d3ctf2.resources
maps/d3ctf3.resources
maps/d3ctf4.resources
maps/d3dm1.resources
maps/d3dm2.resources
maps/d3dm3.resources
maps/d3dm4.resources
maps/d3dm5.resources
maps/d3xpdm1.resources
maps/d3xpdm2.resources
maps/d3xpdm3.resources
maps/d3xpdm4.resources
maps/delta1.resources
maps/delta2a.resources
maps/delta2b.resources
maps/delta3.resources
maps/delta4.resources
maps/delta5.resources
maps/deltax.resources
maps/enpro.resources
maps/erebus1.resources
maps/erebus2.resources
maps/erebus3.resources
maps/erebus4.resources
maps/erebus5.resources
maps/erebus6.resources
maps/hell.resources
maps/hell1.resources
maps/hellhole.resources
maps/le_enpro1.resources
maps/le_enpro2.resources
maps/le_exis1.resources
maps/le_exis2.resources
maps/le_hell.resources
maps/le_hell_post.resources
maps/le_underground.resources
maps/le_underground2.resources
maps/mars_city1.resources
maps/mars_city2.resources
maps/mc_underground.resources
maps/monorail.resources
maps/phobos1.resources
maps/phobos2.resources
maps/phobos3.resources
maps/phobos4.resources
maps/recycling1.resources
maps/recycling2.resources
maps/site3.resources

file system initialized.

WARNING: Unable to open resource file maps/_startup.resources

----- Initializing Decls -----

Couldn't open journal files
execing default.cfg
execing D3BFGConfig.cfg
couldn't exec autoexec.cfg
----- R_InitOpenGL -----
Initializing OpenGL subsystem with multisamples:0 stereo:0 fullscreen:
1
...registered window class
...registered fake window class
Using GLEW 1.10.0
display device: 0
DeviceName : .\DISPLAY1
DeviceString: Intel(R) HD Graphics 4600
StateFlags : 0x5
DeviceID : PCI\VEN_8086&DEV_0416&SUBSYS_05A91028&REV_06
DeviceKey : \Registry\Machine\System\CurrentControlSet\Control\Vid
eo{FB87D598-06CB-4A5A-BF95-E1990DDF5F0F}\0000
DeviceName : .\DISPLAY1\Monitor0
DeviceString: Generic PnP Monitor
StateFlags : 0x3
DeviceID : MONITOR\AUO113D{4d36e96e-e325-11ce-bfc1-08002be10
318}\0003
DeviceKey : \Registry\Machine\System\CurrentControlSet\Control
\Class{4d36e96e-e325-11ce-bfc1-08002be10318}\0003
dmPosition.x : 0
dmPosition.y : 0
dmBitsPerPel : 32
dmPelsWidth : 1920
dmPelsHeight : 1080
dmDisplayFlags : 0x0
dmDisplayFrequency: 60
...calling CDS: ok
display device: 0
DeviceName : .\DISPLAY1
DeviceString: Intel(R) HD Graphics 4600
StateFlags : 0x5
DeviceID : PCI\VEN_8086&DEV_0416&SUBSYS_05A91028&REV_06
DeviceKey : \Registry\Machine\System\CurrentControlSet\Control\Vid
eo{FB87D598-06CB-4A5A-BF95-E1990DDF5F0F}\0000
DeviceName : .\DISPLAY1\Monitor0
DeviceString: Generic PnP Monitor
StateFlags : 0x3
DeviceID : MONITOR\AUO113D{4d36e96e-e325-11ce-bfc1-08002be10
318}\0003
DeviceKey : \Registry\Machine\System\CurrentControlSet\Control
\Class{4d36e96e-e325-11ce-bfc1-08002be10318}\0003
dmPosition.x : 0
dmPosition.y : 0
dmBitsPerPel : 32
dmPelsWidth : 1280
dmPelsHeight : 720
dmDisplayFlags : 0x0
dmDisplayFrequency: 60
...created window @ 0,0 (1280x720)
Initializing OpenGL driver
...creating GL context: created OpenGL 3.2 context
succeeded
...making context current: succeeded
Using GLEW 1.10.0

------- Input Initialization -------
Initializing DirectInput...
mouse: DirectInput initialized.

keyboard: DirectInput initialized.

OpenGL Version : 3.2
OpenGL Vendor : Intel
OpenGL Renderer : Intel(R) HD Graphics 4600
OpenGL GLSL : 1.5
maxTextureAnisotropy: 16.000000
...using GL_EXT_texture_lod_bias
X..GL_GREMEDY_string_marker not found
...using GL_EXT_framebuffer_object
...using GL_EXT_framebuffer_blit
----- Initializing Render Shaders -----
----- Initializing Sound System ------
0: Speakers (Realtek High Definition Audio)
2 channels, 48000 Hz
Front Left and Front Right
Default Console Device, Multimedia Device, Communications Device,
and Game Device
Using device 0

sound system initialized.

------- Initializing renderSystem --------
Updating texture filter parameters.

renderSystem initialized.

Skipping Intro Videos!
Reading strings/english.lang as UTF-8
9104 strings read
--------- Initializing Game ----------
gamename: baseDOOM-1
gamedate: Oct 11 2014
Initializing event system
...535 event definitions
Initializing class hierarchy
...158 classes, 496480 bytes for event callbacks
Initializing scripts
Compiled 'F:\games\SteamLibrary\SteamApps\common\DOOM 3 BFG Edition\ba
se\script\doom_main.script': 2.6 ms
---------- Compile stats ----------

Memory usage:
Strings: 120, 15840 bytes
Statements: 95386, 3815440 bytes
Functions: 3070, 496728 bytes
Variables: 239712 bytes
Mem used: 6284512 bytes
Static data: 6266520 bytes
Allocated: 8567312 bytes
Thread size: 14064 bytes

...6 aas types

game initialized.

Loaded FFMPEG file: 'video/intro/introloop.bik', looping=1512x512, -1.

IND00 FPS, 12.000000 sec

Loaded FFMPEG file: 'video/mars1.bik', looping=0512x512, -1.#IND00 FPS
, 32.166668 sec
Loaded FFMPEG file: 'video/mars_rotation.bik', looping=11567x406, -1.#
IND00 FPS, 100.000000 sec
----- idRenderModelManagerLocal::EndLevelLoad -----

0 models purged from previous level, 3 models kept.

----- idImageManager::EndLevelLoad -----

30 images loaded in 0.1 seconds

----- idSoundSystemLocal::EndLevelLoad -----

7 sounds loaded in 0.0 seconds

------------- Warnings ---------------
during DOOM 3: BFG Edition initialization...
WARNING: Unable to open resource file maps/_startup.resources
1 warnings
Preloading images...

00362 images preloaded ( or were already loaded ) in 0.6 seconds

00259 sounds preloaded in 0.0 seconds

WARNING: Couldn't load image: _doomclassic : _doomclassic#__0200
--- Common Initialization Complete ---
QA Timing IIS: 007422ms
]conDump
usage: conDump
]conDump asd.txt
Dumped console text to asd.txt.

@RobertBeckebans
Copy link
Owner

What is the result if you revert my Nvidia driver bugfix?

2014-10-11 16:38 GMT+02:00 Mikko Kortelainen notifications@github.com:

I compiled latest master HEAD version with Visual Studio 2013 Pro

Here is the binary
https://github.com/kortemik/OpenTechEngineBuilds/tree/rbdoom3 and dlls
can be found at
http://ffmpeg.zeranoe.com/builds/win64/shared/ffmpeg-2.2.3-win64-shared.7z

[image: rbdoom-3-bfg-20141011-142511-001]
https://cloud.githubusercontent.com/assets/884026/4602943/761ad7a8-5153-11e4-8fcd-188289759114.png
[image: rbdoom-3-bfg-20141011-142529-002]
https://cloud.githubusercontent.com/assets/884026/4602942/761466e8-5153-11e4-8b75-5cdce2b8c95a.png
[image: rbdoom-3-bfg-20141011-142648-003]
https://cloud.githubusercontent.com/assets/884026/4602944/761cd9c2-5153-11e4-8927-01a02f8130e2.png
[image: rbdoom-3-bfg-20141011-142655-004]
https://cloud.githubusercontent.com/assets/884026/4602945/76219444-5153-11e4-9fc9-ac97e6d32f47.png

It seems that only one side of the light is projected which makes the game
very much harder :D however flashlight seems to work as intended.

2694 MHz generic CPU with SSE & SSE2
Winsock Initialized
Found interface: {A876BD64-A53B-4E16-BA1A-B40EF6635822} Killer e2200 P
CI-E Gigabit Ethernet Controller (NDIS 6.20) - 192.168.1.34/255.255.25
5.0
Found interface: {2B827356-982F-494A-8F46-83D35AE0D618} Microsoft Wi-F
i Direct Virtual Adapter - 0.0.0.0 NULL netmask - skipped
Found interface: {CE797F8C-C5D9-4E89-9083-6E1312B76F76} Broadcom 802.1
1ac Network Adapter - 0.0.0.0 NULL netmask - skipped
Found interface: {AB7577EF-253A-46C5-8012-65BC3E575351} LogMeIn Hamach
i Virtual Ethernet Adapter - 25.57.108.243/255.0.0.0
Sys_InitNetworking: adding loopback interface
------ Initializing File System ------
Loaded resource file _common.resources
Loaded resource file _ordered.resources
Loaded resource file _sound_pc.resources
Loaded resource file _sound_pc_en.resources
Loaded resource file maps/admin.resources
Loaded resource file maps/alphalabs1.resources
Loaded resource file maps/alphalabs2.resources
Loaded resource file maps/alphalabs3.resources
Loaded resource file maps/alphalabs4.resources
Loaded resource file maps/caverns1.resources
Loaded resource file maps/caverns2.resources
Loaded resource file maps/comm1.resources
Loaded resource file maps/commoutside.resources
Loaded resource file maps/cpu.resources
Loaded resource file maps/cpuboss.resources
Loaded resource file maps/d3ctf1.resources
Loaded resource file maps/d3ctf2.resources
Loaded resource file maps/d3ctf3.resources
Loaded resource file maps/d3ctf4.resources
Loaded resource file maps/d3dm1.resources
Loaded resource file maps/d3dm2.resources
Loaded resource file maps/d3dm3.resources
Loaded resource file maps/d3dm4.resources
Loaded resource file maps/d3dm5.resources
Loaded resource file maps/d3xpdm1.resources
Loaded resource file maps/d3xpdm2.resources
Loaded resource file maps/d3xpdm3.resources
Loaded resource file maps/d3xpdm4.resources
Loaded resource file maps/delta1.resources
Loaded resource file maps/delta2a.resources
Loaded resource file maps/delta2b.resources
Loaded resource file maps/delta3.resources
Loaded resource file maps/delta4.resources
Loaded resource file maps/delta5.resources
Loaded resource file maps/deltax.resources
Loaded resource file maps/enpro.resources
Loaded resource file maps/erebus1.resources
Loaded resource file maps/erebus2.resources
Loaded resource file maps/erebus3.resources
Loaded resource file maps/erebus4.resources
Loaded resource file maps/erebus5.resources
Loaded resource file maps/erebus6.resources
Loaded resource file maps/hell.resources
Loaded resource file maps/hell1.resources
Loaded resource file maps/hellhole.resources
Loaded resource file maps/le_enpro1.resources
Loaded resource file maps/le_enpro2.resources
Loaded resource file maps/le_exis1.resources
Loaded resource file maps/le_exis2.resources
Loaded resource file maps/le_hell.resources
Loaded resource file maps/le_hell_post.resources
Loaded resource file maps/le_underground.resources
Loaded resource file maps/le_underground2.resources
Loaded resource file maps/mars_city1.resources
Loaded resource file maps/mars_city2.resources
Loaded resource file maps/mc_underground.resources
Loaded resource file maps/monorail.resources
Loaded resource file maps/phobos1.resources
Loaded resource file maps/phobos2.resources
Loaded resource file maps/phobos3.resources
Loaded resource file maps/phobos4.resources
Loaded resource file maps/recycling1.resources
Loaded resource file maps/recycling2.resources
Loaded resource file maps/site3.resources
Current search path:
C:\Users\kordex\Saved Games\id Software\RBDOOM 3 BFG/base
F:\games\SteamLibrary\SteamApps\common\DOOM 3 BFG Edition/base
_common.resources
_ordered.resources
_sound_pc.resources
_sound_pc_en.resources
maps/admin.resources
maps/alphalabs1.resources
maps/alphalabs2.resources
maps/alphalabs3.resources
maps/alphalabs4.resources
maps/caverns1.resources
maps/caverns2.resources
maps/comm1.resources
maps/commoutside.resources
maps/cpu.resources
maps/cpuboss.resources
maps/d3ctf1.resources
maps/d3ctf2.resources
maps/d3ctf3.resources
maps/d3ctf4.resources
maps/d3dm1.resources
maps/d3dm2.resources
maps/d3dm3.resources
maps/d3dm4.resources
maps/d3dm5.resources
maps/d3xpdm1.resources
maps/d3xpdm2.resources
maps/d3xpdm3.resources
maps/d3xpdm4.resources
maps/delta1.resources
maps/delta2a.resources
maps/delta2b.resources
maps/delta3.resources
maps/delta4.resources
maps/delta5.resources
maps/deltax.resources
maps/enpro.resources
maps/erebus1.resources
maps/erebus2.resources
maps/erebus3.resources
maps/erebus4.resources
maps/erebus5.resources
maps/erebus6.resources
maps/hell.resources
maps/hell1.resources
maps/hellhole.resources
maps/le_enpro1.resources
maps/le_enpro2.resources
maps/le_exis1.resources
maps/le_exis2.resources
maps/le_hell.resources
maps/le_hell_post.resources
maps/le_underground.resources
maps/le_underground2.resources
maps/mars_city1.resources
maps/mars_city2.resources
maps/mc_underground.resources
maps/monorail.resources
maps/phobos1.resources
maps/phobos2.resources
maps/phobos3.resources
maps/phobos4.resources
maps/recycling1.resources
maps/recycling2.resources
maps/site3.resources
file system initialized.

WARNING: Unable to open resource file maps/_startup.resources
----- Initializing Decls -----

Couldn't open journal files
execing default.cfg
execing D3BFGConfig.cfg
couldn't exec autoexec.cfg
----- R_InitOpenGL -----
Initializing OpenGL subsystem with multisamples:0 stereo:0 fullscreen:
1
...registered window class
...registered fake window class
Using GLEW 1.10.0
display device: 0
DeviceName : .\DISPLAY1
DeviceString: Intel(R) HD Graphics 4600
StateFlags : 0x5
DeviceID : PCI\VEN_8086&DEV_0416&SUBSYS_05A91028&REV_06
DeviceKey : \Registry\Machine\System\CurrentControlSet\Control\Vid
eo{FB87D598-06CB-4A5A-BF95-E1990DDF5F0F}\0000
DeviceName : .\DISPLAY1\Monitor0
DeviceString: Generic PnP Monitor
StateFlags : 0x3
DeviceID : MONITOR\AUO113D{4d36e96e-e325-11ce-bfc1-08002be10
318}\0003
DeviceKey : \Registry\Machine\System\CurrentControlSet\Control
\Class{4d36e96e-e325-11ce-bfc1-08002be10318}\0003
dmPosition.x : 0
dmPosition.y : 0
dmBitsPerPel : 32
dmPelsWidth : 1920
dmPelsHeight : 1080
dmDisplayFlags : 0x0
dmDisplayFrequency: 60
...calling CDS: ok
display device: 0
DeviceName : .\DISPLAY1
DeviceString: Intel(R) HD Graphics 4600
StateFlags : 0x5
DeviceID : PCI\VEN_8086&DEV_0416&SUBSYS_05A91028&REV_06
DeviceKey : \Registry\Machine\System\CurrentControlSet\Control\Vid
eo{FB87D598-06CB-4A5A-BF95-E1990DDF5F0F}\0000
DeviceName : .\DISPLAY1\Monitor0
DeviceString: Generic PnP Monitor
StateFlags : 0x3
DeviceID : MONITOR\AUO113D{4d36e96e-e325-11ce-bfc1-08002be10
318}\0003
DeviceKey : \Registry\Machine\System\CurrentControlSet\Control
\Class{4d36e96e-e325-11ce-bfc1-08002be10318}\0003
dmPosition.x : 0
dmPosition.y : 0
dmBitsPerPel : 32
dmPelsWidth : 1280
dmPelsHeight : 720
dmDisplayFlags : 0x0
dmDisplayFrequency: 60
...created window @ 0,0 (1280x720)
Initializing OpenGL driver
...creating GL context: created OpenGL 3.2 context
succeeded
...making context current: succeeded
Using GLEW 1.10.0

------- Input Initialization -------
Initializing DirectInput...
mouse: DirectInput initialized.
keyboard: DirectInput initialized.

OpenGL Version : 3.2
OpenGL Vendor : Intel
OpenGL Renderer : Intel(R) HD Graphics 4600
OpenGL GLSL : 1.5
maxTextureAnisotropy: 16.000000
...using GL_EXT_texture_lod_bias
X..GL_GREMEDY_string_marker not found
...using GL_EXT_framebuffer_object
...using GL_EXT_framebuffer_blit
----- Initializing Render Shaders -----
----- Initializing Sound System ------
0: Speakers (Realtek High Definition Audio)
2 channels, 48000 Hz
Front Left and Front Right
Default Console Device, Multimedia Device, Communications Device,
and Game Device
Using device 0
sound system initialized.

------- Initializing renderSystem --------
Updating texture filter parameters.
renderSystem initialized.

Skipping Intro Videos!
Reading strings/english.lang as UTF-8
9104 strings read
--------- Initializing Game ----------
gamename: baseDOOM-1
gamedate: Oct 11 2014
Initializing event system
...535 event definitions
Initializing class hierarchy
...158 classes, 496480 bytes for event callbacks
Initializing scripts
Compiled 'F:\games\SteamLibrary\SteamApps\common\DOOM 3 BFG Edition\ba
se\script\doom_main.script': 2.6 ms
---------- Compile stats ----------

Memory usage:
Strings: 120, 15840 bytes
Statements: 95386, 3815440 bytes
Functions: 3070, 496728 bytes
Variables: 239712 bytes
Mem used: 6284512 bytes
Static data: 6266520 bytes
Allocated: 8567312 bytes
Thread size: 14064 bytes

...6 aas types
game initialized.

Loaded FFMPEG file: 'video/intro/introloop.bik', looping=1512x512, -1.
#IND00 FPS, 12.000000 sec
Loaded FFMPEG file: 'video/mars1.bik', looping=0512x512, -1.#IND00 FPS
, 32.166668 sec
Loaded FFMPEG file: 'video/mars_rotation.bik', looping=11567x406, -1.#
IND00 FPS, 100.000000 sec
----- idRenderModelManagerLocal::EndLevelLoad -----
0 models purged from previous level, 3 models kept.

----- idImageManager::EndLevelLoad -----
30 images loaded in 0.1 seconds

----- idSoundSystemLocal::EndLevelLoad -----
7 sounds loaded in 0.0 seconds

------------- Warnings ---------------
during DOOM 3: BFG Edition initialization...
WARNING: Unable to open resource file maps/_startup.resources
1 warnings
Preloading images...
00362 images preloaded ( or were already loaded ) in 0.6 seconds 00259
sounds preloaded in 0.0 seconds

WARNING: Couldn't load image: _doomclassic : _doomclassic#__0200
--- Common Initialization Complete ---
QA Timing IIS: 007422ms
]conDump
usage: conDump
]conDump asd.txt
Dumped console text to asd.txt.


Reply to this email directly or view it on GitHub
#176.

@kortemik
Copy link
Author

I will try out 72f9860

@kortemik
Copy link
Author

It's the same before the nvidia bug fix. I think it has something to do with the Intel graphics. If I switch to NVidia it's not affected (optimus here).

rbdoom-3-bfg-20141013-100817-001

Bin at https://github.com/kortemik/OpenTechEngineBuilds/blob/rbdoom3/RBDoom3BFG-72f9860.exe

@BielBdeLuna
Copy link

I can get to start those two binaries Kortemik, I'm on win7 and with an Nvidia.

maybe the Intel graphics drivers are not accepted by the engine like in Linux?

@BielBdeLuna
Copy link

how does one get the info from the console from windows?

@kortemik
Copy link
Author

conDump asd.txt will save it to c:\users\name\my saved games\id
software\rbdoom3\asd.txt (sorry if the path is not accurate but will give
you a hint :)

On Mon, Oct 13, 2014 at 2:38 PM, Biel Bestué de Luna <
notifications@github.com> wrote:

how does one get the info from the console from windows?


Reply to this email directly or view it on GitHub
#176 (comment)
.

@BielBdeLuna
Copy link

but if I can't even open the engine? is there a way to use a console (not DOS) input in win so I can see why it fails to start?

@kortemik
Copy link
Author

Do you get any kind of an error? One needs to extract the ffmpeg libs in
the same directory as the executable is in. Link on the first post.

On Mon, Oct 13, 2014 at 5:38 PM, Biel Bestué de Luna <
notifications@github.com> wrote:

but if I can't even open the engine? is there a way to use a console (not
DOS) input in win so I can see why it fails to start?


Reply to this email directly or view it on GitHub
#176 (comment)
.

@DanielGibson
Copy link

Somehow this whole ffmpeg stuff is a huge pain in the ass.. we should consider integrating the ffmpeg or libav source code as a git submodule and build it ourselves.. and possibly link it statically. What do you think Robert?
Not sure how that works out in detail (with ffmpeg using autotools) but it could work?

@BielBdeLuna
Copy link

ffmpeg is for the videos in the screens isn't it? if so why not skip the bik proprietary format and go for some oss video system

@DanielGibson
Copy link

that's certainly a good solution for standalone projects/opentechbfg,
but rbd3bfg should stay compatible with the bfg assets.

@BielBdeLuna
Copy link

but maybe we can convert the bik to something more manegable prior to game-play via scirpts using whatever version of ffmpeg the user has in his system and then use the newly created video codec for game-play, so if the user wants to see the videos in-game first he has to run the codec to batch-convert all the videos to a FLOSS video format

just like Quake1 engines work today, if you want the music you have to rip them off the CD and convert it to ogg/mp3 in order to hear it in-game.

@nbohr1more
Copy link

Revelator was seeing all sorts of shadow bugs due to VS 2013. Do you get better results if you compile under VS 2010?

@kortemik
Copy link
Author

I tested with mingw-w64 build on windows, it's the same.

Also affects latest Radeon drivers on windows with hd 7970

@kortemik kortemik changed the title Windows build has lightning broken Windows build has lighting broken Oct 30, 2014
@kortemik
Copy link
Author

kortemik commented Nov 1, 2014

i can now confirm that it does not happen when
r_useShadowMapping 0
does that require something special from graphics drivers to work? It's strange that it works with NVidia drivers but not with Intel ones.

@DanielGibson
Copy link

That's not strange at all, intel is known for crappy GPU drivers :-P

@revelator
Copy link

Ouch intel gfx has allways been a pain in the ass to get working correctly :(
The lighting bug was due to a a function being optimized that broke with vs 2013 since vs 2013 changed floating point optimization to SSE math functions instead of x87 math. Not sure it applies to BFG but worth looking at, the fix is allready in the darkmod source code.

@DanielGibson
Copy link

I guess a hint towards where in the darkmod source the fix can be found would be helpful :-)

BTW, speaking of SSE vs x87, there is a collision bug that happens on terrain-y ground at "extreme" coordinates (i.e. it doesn't happen around (0,0,0), but around (20k, 20k, 0) or something) when using SSE math, but not with x87.
OpenTechEngine/Discussions#11 has some info of that including video and testcase. (Not sure about the fixes, especially the one motorsep posted looks fishy).
Do you know if TDM ran across that bug and has a fix?

@revelator
Copy link

Just took me a while to locate it again been a while since i last toyed with it :)

this is the code for vanilla with the fix from greebo


#if defined(_MSC_VER) && _MSC_VER >= 1800 && !defined(DEBUG)
// greebo: switch off function inlining for this file in VC++ 2013 release builds
// Function inlining seems to cause lighting bugs (triangles are drawn very dark or black)
#pragma optimize("t", off)
#endif

/*
====================
R_CreateLightTris

The resulting surface will be a subset of the original triangles,
it will never clip triangles, but it may cull on a per-triangle basis.
====================
*/
static srfTriangles_t *R_CreateLightTris(const idRenderEntityLocal *ent, const srfTriangles_t *tri, const idRenderLightLocal *light, const idMaterial *shader, srfCullInfo_t &cullInfo) {
    int             i;
    int             numIndexes;
    glIndex_t       *indexes;
    srfTriangles_t  *newTri;
    int             c_backfaced;
    int             c_distance;
    idBounds        bounds;
    bool            includeBackFaces;
    int             faceNum;
    tr.pc.c_createLightTris++;
    c_backfaced = 0;
    c_distance = 0;
    numIndexes = 0;
    indexes = NULL;
    // it is debatable if non-shadowing lights should light back faces. we aren't at the moment
    if (r_lightAllBackFaces.GetBool() ||
        light->lightShader->LightEffectsBackSides() ||
        shader->ReceivesLightingOnBackSides() ||
        ent->parms.noSelfShadow ||
        ent->parms.noShadow) {
        includeBackFaces = true;
    }
    else {
        includeBackFaces = false;
    }
    // allocate a new surface for the lit triangles
    newTri = R_AllocStaticTriSurf();
    // save a reference to the original surface
    newTri->ambientSurface = const_cast<srfTriangles_t *>(tri);
    // the light surface references the verts of the ambient surface
    newTri->numVerts = tri->numVerts;
    R_ReferenceStaticTriSurfVerts(newTri, tri);
    // calculate cull information
    if (!includeBackFaces) {
        R_CalcInteractionFacing(ent, tri, light, cullInfo);
    }
    R_CalcInteractionCullBits(ent, tri, light, cullInfo);
    // if the surface is completely inside the light frustum
    if (cullInfo.cullBits == LIGHT_CULL_ALL_FRONT) {
        // if we aren't self shadowing, let back facing triangles get
        // through so the smooth shaded bump maps light all the way around
        if (includeBackFaces) {
            // the whole surface is lit so the light surface just references the indexes of the ambient surface
            R_ReferenceStaticTriSurfIndexes(newTri, tri);
            numIndexes = tri->numIndexes;
            bounds = tri->bounds;
        }
        else {
            // the light tris indexes are going to be a subset of the original indexes so we generally
            // allocate too much memory here but we decrease the memory block when the number of indexes is known
            R_AllocStaticTriSurfIndexes(newTri, tri->numIndexes);
            // back face cull the individual triangles
            indexes = newTri->indexes;
            const byte *facing = cullInfo.facing;
            for (faceNum = i = 0; i < tri->numIndexes; i += 3, faceNum++) {
                if (!facing[faceNum]) {
                    c_backfaced++;
                    continue;
                }
                indexes[numIndexes + 0] = tri->indexes[i + 0];
                indexes[numIndexes + 1] = tri->indexes[i + 1];
                indexes[numIndexes + 2] = tri->indexes[i + 2];
                numIndexes += 3;
            }
            // get bounds for the surface
            SIMDProcessor->MinMax(bounds[0], bounds[1], tri->verts, indexes, numIndexes);
            // decrease the size of the memory block to the size of the number of used indexes
            R_ResizeStaticTriSurfIndexes(newTri, numIndexes);
        }
    }
    else {
        // the light tris indexes are going to be a subset of the original indexes so we generally
        // allocate too much memory here but we decrease the memory block when the number of indexes is known
        R_AllocStaticTriSurfIndexes(newTri, tri->numIndexes);
        // cull individual triangles
        indexes = newTri->indexes;
        const byte *facing = cullInfo.facing;
        const byte *cullBits = cullInfo.cullBits;
        for (faceNum = i = 0; i < tri->numIndexes; i += 3, faceNum++) {
            int i1, i2, i3;
            // if we aren't self shadowing, let back facing triangles get
            // through so the smooth shaded bump maps light all the way around
            if (!includeBackFaces) {
                // back face cull
                if (!facing[faceNum]) {
                    c_backfaced++;
                    continue;
                }
            }
            i1 = tri->indexes[i + 0];
            i2 = tri->indexes[i + 1];
            i3 = tri->indexes[i + 2];
            // fast cull outside the frustum
            // if all three points are off one plane side, it definately isn't visible
            if (cullBits[i1] & cullBits[i2] & cullBits[i3]) {
                c_distance++;
                continue;
            }
            if (r_usePreciseTriangleInteractions.GetBool()) {
                // do a precise clipped cull if none of the points is completely inside the frustum
                // note that we do not actually use the clipped triangle, which would have Z fighting issues.
                if (cullBits[i1] && cullBits[i2] && cullBits[i3]) {
                    int cull = cullBits[i1] | cullBits[i2] | cullBits[i3];
                    if (!R_ClipTriangleToLight(tri->verts[i1].xyz, tri->verts[i2].xyz, tri->verts[i3].xyz, cull, cullInfo.localClipPlanes)) {
                        continue;
                    }
                }
            }
            // add to the list
            indexes[numIndexes + 0] = i1;
            indexes[numIndexes + 1] = i2;
            indexes[numIndexes + 2] = i3;
            numIndexes += 3;
        }
        // get bounds for the surface
        SIMDProcessor->MinMax(bounds[0], bounds[1], tri->verts, indexes, numIndexes);
        // decrease the size of the memory block to the size of the number of used indexes
        R_ResizeStaticTriSurfIndexes(newTri, numIndexes);
    }
    if (!numIndexes) {
        R_ReallyFreeStaticTriSurf(newTri);
        return NULL;
    }
    newTri->numIndexes = numIndexes;
    newTri->bounds = bounds;
    return newTri;
}

#if defined(_MSC_VER) && _MSC_VER >= 1800 && !defined(DEBUG)
// greebo: switch off function inlining for this file in VC++ 2013 release builds
// Function inlining seems to cause lighting bugs (triangles are drawn very dark or black)
#pragma optimize("t", on)
#endif

its located in interaction.cpp

@DanielGibson
Copy link

pro-tip: if you put ``` around your code, it's nicely formatted :-)
and you can even specify a language for syntax hilighting, like

```c++
foo::bar(42);
```

@revelator
Copy link

Ah thanks.

Btw the same function in BFG is actually split into two named R_CreateInteractionLightTris and
R_CreateInteractionShadowVolume. One could try enclosing those two functions in the pragma optimize off block it might just work :)

@revelator
Copy link

Quick test shows no adverse effects, but its to early to tell if it fixes it 100% though.
Hope it helps at least.

@revelator
Copy link

Formatted the posted code should be readable now :)

ignore the function itself the fix is turning off inlining on that function so

#if defined(_MSC_VER) && _MSC_VER >= 1800 && !defined(DEBUG)
// greebo: switch off function inlining for this file in VC++ 2013 release builds
// Function inlining seems to cause lighting bugs (triangles are drawn very dark or black)
#pragma optimize("t", off)
#endif

function

#if defined(_MSC_VER) && _MSC_VER >= 1800 && !defined(DEBUG)
// greebo: switch off function inlining for this file in VC++ 2013 release builds
// Function inlining seems to cause lighting bugs (triangles are drawn very dark or black)
#pragma optimize("t", on)
#endif

gcc uses x87 math by default so should still work allright there.

@DanielGibson
Copy link

"gcc uses x87 math by default so should still work allright there." well, only for x86, not for amd64

@revelator
Copy link

Only tried building it once with mingw64 and was a 32 bit build so was not aware, wonder what the switch is for turning off inlining with gcc ? or is there also a pragma for that.
atleast msvc pragmas dont seem to be recognized by gcc but i do use a few gcc specific ones, though i dont know all the pragmas gcc support.

@revelator
Copy link

Hmm looked up the gcc pragmas and there seems to not be any for turning of inlining on a specific function. The closest thing to do that seems to be to put attribute ((noinline)) in the function.

@DanielGibson
Copy link

is inlining really the problem (if so, also in mingw builds)?
__attribute__((noinline)) should do the trick then, but if it turned out that both mingw and msvc produce problems if the function is inlined, probably the code is buggy and should be fixed. It seems unlikely that both compilers have the same bug.

(another pro-tip: if you want some sourcecode unaffected by markdown inline - i.e. not in a block like above - single backticks do the trick, like

bla `__attribute__((inline))` blub

for bla __attribute__((inline)) blub
:-)

@revelator
Copy link

Heh strange markdown syntax :) but thanks.

Not sure if gcc affects inlining the same way msvc does but then again i only tried a 32 bit build and in that case inlining seems to work so i guess ill have to try a 64 bit build to figure out if it behaves the same way on gcc then.

In msvc 2013 atleast it is on vanilla doom3 sources but not sure if the same
goes for BFG, after all the SSE functions used in BFG more closely resemble intels SSE standards while vanilla used the older x87 standards in conjunction with handwritten ASM style SSE functions.

As a test case it might hold some merit though :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants