VRAD HDR Crash Fix
This fix applies to instances where VRAD crashes as it begins the HDR lighting pass while using the switch -both. The LDR part of the compile typically completes without error, but once the HDR part starts, VRAD crashes without an error message.
Splitting the LDR and HDR passes in vrad.exe execution seems to prevent this crash from occurring. This is as simple as defining 2 vrad commands -- one using the "-ldr" switch and the other using the "-hdr" switch -- instead of just one using the "-both" switch in Hammer's compile configuration. The following will detail what you can do in Hammer to achieve this.
Credit to Xanthi of the Steam User's forum for bringing this fix to light.
Setting up Hammer
- Open up the Run Map dialog (File -> Run... or F9) in Hammer.
- If not already in "Expert Mode", click the "Expert" button in the bottom left of the dialog.
- Select "HDR Full Compile" from the Configuration pull-down.
- Note: In this example, we are editing the existing "HDR Full Compile" configuration to apply the fix. The following steps can be used for the "HDR Full Compile -final (Slow)" configuration by maintaining the -final switch in the Parameters box.
- Select the 3rd item down, it should say "$light_exe -both -game $gamedir..."
- In the text box labeled "Parameters", along the right of the dialog, change the switch "-both" to "-ldr". It should now read "-ldr -game $gamedir $path\$file"
- Click the "New" button to create a new command in the configuration and select the new blank command at the bottom of the list.
- Press the "Move up" button twice to move the new command to right under the command you just edited.
- Enter into the text box labeled "Command": $light_exe or use the "Cmd" button to the right and select the "LIGHT Program" option for the drop-down menu.
- Into the Parameters text box enter: "-hdr -game $gamedir $path\$file"
You now have a fixed HDR compile configuration in Hammer. You must use this configuration in "Expert" mode. "Normal" mode will still use the -both flag for HDR compiles.