Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.00 KB | None | 0 0
  1. #############################################################################
  2. #
  3. # Logging settings
  4. #
  5.  
  6. set logGroup "ConfigurationManager"
  7. set logLevelWarning warning
  8. set logLevelInfo info
  9. set logLevelDebug debug
  10.  
  11. log $logGroup $logLevelInfo "Parsing configuration script"
  12.  
  13.  
  14. #############################################################################
  15. #
  16. # Constants
  17. #
  18.  
  19. seti Off 0
  20. seti On 1
  21.  
  22. seti Low 1
  23. seti Medium 2
  24. seti High 3
  25.  
  26. seti MediumButDefaultLow 4
  27.  
  28. seti memoryLevelHigh 512
  29. seti memoryLevelMedium 384
  30. seti memoryLevelLow 256
  31. seti memoryLevelUnknown 0
  32.  
  33. if ( match("${osVersion}","*NT 6.0*") )
  34. seti cpuLevelHigh 3000
  35. seti cpuLevelMedium 2600
  36. seti cpuLevelLow 2000
  37. log $logGroup $logLevelInfo "Setting cpu level for Vista."
  38. else
  39. seti cpuLevelHigh 2800
  40. seti cpuLevelMedium 2200
  41. seti cpuLevelLow 1450
  42. log $logGroup $logLevelInfo "Setting cpu level for non-Vista."
  43. endif
  44.  
  45. seti cpuLevelUnsupported 0
  46.  
  47.  
  48. #############################################################################
  49. #
  50. # Identify gfx device
  51. #
  52.  
  53. # set some config variables based on a card table and vendor specific rules
  54. # sets isCardFound, cardVendor, and cardName
  55. include "Video Cards.sgr"
  56.  
  57. # Fallback on the card name text supplied by the card itself.
  58. # Assumes that at least the cardVendor has been matched, since
  59. # vendor name is not contained in some vendor card names.
  60. # Note that specific vendors are overridden to a default card.
  61. # For ATI -> Radeon 9800 Pro
  62. # For NVIDIA -> NVIDIA 4800 TI SE
  63. if (not $isCardFound)
  64. set cardName $cardNameText
  65. endif
  66.  
  67.  
  68.  
  69. #############################################################################
  70. #
  71. # Configuration override controlled by command line option -cardConfig.
  72. #
  73. if (varExists(cardConfig))
  74. # test unsupported cards using sw rendering
  75. if ($cardConfig = 1)
  76. log $logGroup $logLevelInfo "Testing with all devices unsupported."
  77. set cardVendor TestingAllUnsupported
  78. set cardName TestingAllUnsupported
  79.  
  80. elseif (($cardConfig = 2) and ($deviceNumber = 0))
  81. log $logGroup $logLevelInfo "Testing with the first device unsupported."
  82. set cardVendor TestingFirstUnsupported
  83. set cardName TestingFirstUnsupported
  84.  
  85. elseif (($cardConfig = 3) and ($deviceNumber != 0))
  86. log $logGroup $logLevelInfo "Testing with the all devices except first unsupported."
  87. set cardVendor TestingAllButFirstUnsupported
  88. set cardName TestingAllButFirstUnsupported
  89.  
  90. elseif (($cardConfig = 100) and ($deviceNumber = 0))
  91. log $logGroup $logLevelInfo "Testing first device as swvp only part."
  92. boolProp forceSoftwareVP true
  93. endif
  94. endif
  95.  
  96.  
  97.  
  98. #############################################################################
  99. #
  100. # Determine if gfx device is supported, force software rendering if not
  101. #
  102.  
  103. setb useSoftwareRasterizer false
  104.  
  105. if (match("${cardVendor}", "ATI"))
  106. if (match("${cardName}", "*Mach*") or match("${cardName}", "*Rage*"))
  107. setb useSoftwareRasterizer true
  108. endif
  109.  
  110. elseif (match("${cardVendor}", "NVidia"))
  111. if (match("${cardName}", "NV 1") or match("${cardName}", "NV 2") or match("${cardName}", "*Riva*") or match("${cardName}", "*TNT*"))
  112. setb useSoftwareRasterizer true
  113. endif
  114.  
  115. elseif (match("${cardVendor}", "Intel"))
  116. if (match("${cardName}", "*810*") or match("${cardName}", "*815*") or match("${cardName}", "*740*") or match("${cardName}", "*752*"))
  117. setb useSoftwareRasterizer true
  118. endif
  119.  
  120. elseif (match("${cardVendor}", "S3"))
  121. if (not match("${cardName}", "*GammaChrome*") and not match("${cardName}", "*DeltaChrome*"))
  122. setb useSoftwareRasterizer true
  123. endif
  124.  
  125. else
  126. # unsupported/unknown vendor
  127. setb useSoftwareRasterizer true
  128.  
  129. endif
  130.  
  131. if ($useSoftwareRasterizer)
  132. log $logGroup $logLevelWarning "Unsupported video card. Forcing software rendering on this device"
  133. else
  134. log $logGroup $logLevelInfo "Supported video card."
  135. endif
  136.  
  137. if (not $useSoftwareRasterizer)
  138. # failed to obtain device texture memory size, force to 32MB
  139. if ($textureMemory = 0)
  140. seti textureMemory 32
  141. setb textureMemorySizeOK false
  142. endif
  143.  
  144. if ($textureMemory < 28)
  145. log $logGroup $logLevelWarning "Insufficient video memory. Forcing software rendering on this device"
  146.  
  147. # require a card with at least 32MB
  148. setb useSoftwareRasterizer true
  149. endif
  150. endif
  151.  
  152. if ($useSoftwareRasterizer)
  153. # ignore texture memory reported by gfx device, this is not hardware texture memory
  154. seti textureMemory 32
  155. endif
  156.  
  157. if (not $useSoftwareRasterizer)
  158. log $logGroup $logLevelInfo "Hardware rendering is enabled"
  159. endif
  160.  
  161.  
  162.  
  163. #############################################################################
  164. #
  165. # Apply gfx device specific workarounds
  166. #
  167. # Available device props:
  168. # forceSoftwareVP
  169. # forceSoftwareDevice
  170. # queriesOK
  171. # windowedModeFormatConversionOK
  172. # enumerateMultisampleLevels
  173. # skipValidateDevice
  174. # enableDriverMemoryManager
  175. # softwareDeviceLocalVideoMemorySize
  176. # deviceLocalVideoMemorySizeDefault
  177. # disableVSyncSupport
  178. # substituteFlipForDiscardSwapEffect
  179. # minTextureDimensionForBalance
  180. #
  181. # Additional props:
  182. # vs2LoopsFunctional
  183.  
  184. setb textureMemorySizeOK true
  185. setb supportsDirtyRect true
  186. setb supportsTurboRect true
  187. setb supportsSpecialEventCamera true
  188. setb forceLowSettings false
  189. setb forceLowResolution false
  190. setb defaultLowResolution false
  191. setb forceMediumMaterialDetail false
  192. setb isIntegratedChipset false
  193. setb forceMediumShadows false
  194. setb forceMediumObjectDetail false
  195. boolProp useRenderTextures false
  196. uintProp antialiasingSupport 1
  197.  
  198. boolProp dontMergeNHFlora true
  199.  
  200.  
  201. if (not $useSoftwareRasterizer)
  202.  
  203. # never trust the driver to manage its own memory
  204. boolProp enableDriverMemoryManager false
  205.  
  206. boolProp vs2LoopsFunctional false
  207. boolProp presentWorkaround false
  208. boolProp enumerateMultisampleLevels true
  209.  
  210. # not enough texture memory for antialiasing
  211. if ($textureMemory < 127)
  212. boolProp enumerateMultisampleLevels false
  213. endif
  214.  
  215. if (match("${cardVendor}", "NVIDIA"))
  216. # on NVidia cards, create a dummy texture on device creation to prevent BSODs
  217. boolProp createNVidiaWorkaroundTexture true
  218.  
  219. if ($appControlledAA)
  220. # nvidia drivers handle offscreen aa
  221. uintProp antialiasingSupport 3
  222. else
  223. # remove this when the texture manager balancing is fixed.
  224. boolProp disableTexMemEstimateAdjustment true
  225.  
  226. # turn off dirty rects
  227. uintProp antialiasingSupport 1
  228. setb supportsDirtyRect false
  229. endif
  230.  
  231. if (match("${cardName}", "*GeForce2*Integrated*") or match("${cardName}", "*GeForce?2*Integrated*") or match("${cardName}", "*GeForce4*Integrated*") or match("${cardName}", "*GeForce?4*Integrated*") or match("${cardName}", "*GeForce2 Quadro2 Pro*"))
  232. boolProp causticsEnabled false
  233. boolProp enumerateMultisampleLevels false
  234.  
  235. setb forceLowSettings true
  236. setb forceLowResolution true
  237. endif
  238.  
  239. # the 6200 Turbo Cache peformed very poorly in CATLAB runs for EP2
  240. if (match("${cardName}", "*6200 TC*") or match("${cardName}", "*6100*"))
  241. setb forceLowSettings true
  242. setb defaultLowResolution true
  243. endif
  244.  
  245. # need to get around the problem of z fighting in GeForce4 cards
  246. if (match("${cardName}", "*GeForce4*"))
  247. boolProp raiseLightSnowFF true
  248. endif
  249.  
  250. # disable shaders by default for NV3x generation, only enable for high end cards
  251. if ($maxVertexProgramVersionHWMajor = 2)
  252. boolProp useShaders false
  253.  
  254. if (match("${cardName}", "GeForceFX*") or match("${cardName}", "*GeForce?FX*"))
  255. if (match("${cardName}", "*57?0*") or match("${cardName}", "*58?0*") or match("${cardName}", "*59?0*"))
  256. boolProp useShaders true
  257. boolProp causticsEnabled false
  258.  
  259. log $logGroup $logLevelInfo "Enabling shaders for high-end NV3x"
  260. endif
  261. if (match("${cardName}", "*NV35*") or match("${cardName}", "*NV36*") or match("${cardName}", "*NV38*") or match("${cardName}", "*NV39*"))
  262. boolProp useShaders true
  263.  
  264. log $logGroup $logLevelInfo "Enabling shaders for high-end NV3x"
  265. endif
  266.  
  267. # 5700 cards sometimes have problems with bump mapping so setting default to medium
  268. if (match("${cardName}", "*5700*"))
  269. log $logGroup $logLevelInfo "Forcing Medium Material detail on 5700"
  270. setb forceMediumMaterialDetail true
  271. endif
  272.  
  273. if (match("${cardName}", "*5700LE*"))
  274. log $logGroup $logLevelInfo "Forcing low settings on 5700LE and 6100"
  275. setb forceLowSettings true
  276. boolProp useShaders false
  277. endif
  278.  
  279. endif
  280.  
  281. if (match("${cardName}", "QuadroFX*") or match("${cardName}", "*Quadro?FX*"))
  282. if (match("${cardName}", "*3000*") or match("${cardName}", "*1?00*"))
  283. boolProp useShaders true
  284.  
  285. log $logGroup $logLevelInfo "Enabling shaders for high-end NV3x Quadro"
  286. endif
  287.  
  288. if (match("${cardName}", "*2000*") or match("${cardName}", "*1000*") or match("${cardName}", "*1300*"))
  289. boolProp causticsEnabled false
  290.  
  291. log $logGroup $logLevelInfo "Disabling caustics as these cause cards cause problems with shadows"
  292. endif
  293. endif
  294.  
  295. # caps read vs 3.0, but dx9b is returning vs 2.0, once 9c is used this fix can be removed
  296. if (match("${cardName}", "*GeForce*"))
  297. if (match("${cardName}", "*68?0*"))
  298. boolProp useShaders true
  299.  
  300. log $logGroup $logLevelInfo "Enabling shaders for high-end NV40 Parts on Dx9b"
  301. endif
  302. endif
  303. endif
  304.  
  305. if ($maxVertexProgramVersionHWMajor = 0)
  306. boolProp skipValidateDevice true
  307.  
  308. log $logGroup $logLevelInfo "Enabling D3DERR_CONFLICTINGRENDERSTATE validation workaround"
  309. endif
  310.  
  311. elseif (match("${cardVendor}", "ATI"))
  312. # loops support broken in 6458. Fixed in catalyst 4.9 (6476) but we require 4.10 to be safe.
  313. if ($driverBuild >= 6476)
  314. boolProp vs2LoopsFunctional true
  315. endif
  316.  
  317. # workaround for forced aa crash as of 6458. Fixed in catalyst 4.9 (6476) but we require 4.10 to be safe.
  318. # TODO: this is not yet enabled, pending testing
  319. #if ($driverBuild < 6476)
  320. boolProp useRenderTextures true
  321. #endif
  322.  
  323.  
  324. # avoid a race condition with color copies and ui
  325. boolProp presentWorkaround true
  326.  
  327. if (match("${cardName}", "*Radeon?VE*") or match("${cardName}", "*7?00*") or match("${cardName}", "*R100*") or match("${cardName}", "*IGP 3?0*") or match("${cardName}", "*9100 IGP*"))
  328. log $logGroup $logLevelInfo "Forcing turbo rects off"
  329. setb supportsTurboRect false
  330.  
  331. boolProp simpleTerrain true
  332. boolProp causticsEnabled false
  333. boolProp enumerateMultisampleLevels false
  334.  
  335. setb forceLowSettings true
  336.  
  337. if (match("${cardName}", "*9100 IGP*"))
  338. log $logGroup $logLevelInfo "Forcing low resolution"
  339. setb defaultLowResolution true
  340. endif
  341.  
  342. if (match("${cardName}", "*Radeon?VE*") or $driverBuild < 6414)
  343. log $logGroup $logLevelInfo "Forcing swvp"
  344. boolProp forceSoftwareVP true
  345. endif
  346. endif
  347.  
  348. if (match("${cardName}", "*X1300*") or match("${cardName}", "*X300*") or match("${cardName}", "*XPRESS 200*"))
  349. log $logGroup $logLevelInfo "Forcing medium settings or lower"
  350. boolProp useShaders false
  351. setb forceLowSettings true
  352. endif
  353.  
  354. boolProp usePS30 false
  355.  
  356. if ($maxVertexProgramVersionHWMajor < 2)
  357. # Radeon 8500 and greater have problems switching between FF and VS?
  358. log $logGroup $logLevelInfo "Forcing shaders of for ATI DX8"
  359.  
  360. boolProp useShaders false
  361. endif
  362.  
  363. if (match("${cardName}", "*8500*"))
  364. #avoid z fighting with light snow
  365. boolProp raiseLightSnowFF true
  366. setb defaultLowResolution true
  367. endif
  368.  
  369. if (match("${cardName}", "*9600 SE *"))
  370. setb forceMediumMaterialDetail true
  371. setb forceMediumShadows true
  372. setb forceMediumObjectDetail true
  373. endif
  374.  
  375. if (match("${cardName}", "*Mobility*"))
  376. setb isIntegratedChipset true
  377. endif
  378.  
  379. # X800 based cards exhibit rendering corruption if turbo rect is enabled
  380. if (match("${cardName}", "*X800*") or match("${cardName}", "*R420*"))
  381. setb supportsTurboRect false
  382.  
  383. log $logGroup $logLevelInfo "Forcing turbo rects off"
  384. endif
  385.  
  386.  
  387. if (match("${cardName}", "*92?0*"))
  388. log $logGroup $logLevelInfo "Forcing shadow detail on 9250 and 9200"
  389. setb forceMediumShadows true
  390. endif
  391.  
  392. elseif (match("${cardVendor}", "S3"))
  393. if (match("${cardName}", "*GammaChrome*") or match("${osVersion}","*NT 6.0*") )
  394. boolProp useShaders false
  395. log $logGroup $logLevelInfo "Forcing Gamma Chrome to use fixed function shaders"
  396. endif
  397.  
  398. # EP6 CATlab reports gray screen during all cinematics
  399. if (match("${cardName}", "*S27*"))
  400. setOption SpecialEventCamera $Off
  401. endif
  402.  
  403.  
  404. elseif (match("${cardVendor}", "Intel"))
  405. if (match("${cardName}", "*X3000*"))
  406. boolProp disableVSyncSupport true # work around flickering UI
  407. else
  408. boolProp simpleTerrain true
  409. boolProp enumerateMultisampleLevels false
  410. boolProp disableVSyncSupport true # work around flickering UI
  411. boolProp useShaders false # (EP2 change) mostly for performance, but driver issues showed up in v14.14
  412. endif
  413.  
  414. # the Intel minspec driver doesn't misreport available texture memory, so it's not
  415. # necessary to adjust the texture memory estimate it returns. This may also fix
  416. # a Windows "device failure" message that occurs sometimes on this device.
  417. boolProp disableTexMemEstimateAdjustment true
  418.  
  419. # assuming Intel parts are UMA, drop the texture memory to 32 if not much system memory
  420. if ($memory <= $memoryLevelLow)
  421. if ($textureMemory > 32)
  422. seti textureMemory 32
  423. endif
  424. endif
  425.  
  426. if (match("${cardName}", "*845*") or match("${cardName}", "*865*") or match("${cardName}", "*830*") or match("${cardName}", "*855*"))
  427. boolProp causticsEnabled false
  428.  
  429. setb forceLowSettings true
  430. setb forceLowResolution true
  431. endif
  432.  
  433. # the 915 sets the caps bit that indicates it can do texture projection,
  434. # but does it incorrectly in the pixel stage. Here we override the texture
  435. # projection cap we get from the device.
  436. if (match("${cardName}", "*915*"))
  437. boolProp disableTextureProjection true
  438. endif
  439. endif
  440.  
  441. intProp deviceLocalVideoMemorySizeDefault ($textureMemory * 1024 * 1024)
  442.  
  443. else
  444. setb forceLowSettings true
  445. setb forceLowResolution true
  446.  
  447. # force sw, swvp, and no aa
  448. boolProp forceSoftwareDevice true
  449. boolProp forceSoftwareVP true
  450. boolProp enumerateMultisampleLevels false
  451. boolProp simpleTerrain true
  452. boolProp causticsEnabled false
  453.  
  454. intProp softwareDeviceLocalVideoMemorySize ($textureMemory * 1024 * 1024)
  455.  
  456. endif
  457.  
  458. # since we don't do bumpmapping on less ps2.0-capable hardware, eliminate tangents
  459. # from the vertex data
  460. # also, the presence of per-vertex tangents in the vertex data stream causes
  461. # "exploded" polygons on the Radeon 9000, even if the data is ignored by the shader
  462. if ($maxPixelProgramVersionMajor < 2)
  463. boolProp skipTangentsInVertexData true
  464. endif
  465.  
  466.  
  467. #############################################################################
  468. #
  469. # Print system info
  470. #
  471.  
  472. if ($deviceNumber = 0)
  473. logSystemInfo "=== Application info ==="
  474. logSystemInfo "Name: ${appName}"
  475. logSystemInfo "Version: ${version}"
  476. logSystemInfo "Build: ${buildType}"
  477.  
  478. logSystemInfo "=== Machine info ==="
  479. logSystemInfo "OS version: ${osVersion}"
  480. logSystemInfo "CPU: ${cpuSpeed}Mhz, Name:${CPU}, FPU:${FPU}, MMX:${MMX}"
  481. logSystemInfo "Memory: ${memory}MB"
  482. logSystemInfo "Free memory: ${freeMemory}MB"
  483. logSystemInfo "User: ${userName}"
  484. logSystemInfo "Computer: ${computerName}"
  485.  
  486. logSystemInfo "=== Sound device info ==="
  487. logSystemInfo "Name: ${soundCardName}"
  488. logSystemInfo "Driver: ${soundDriverName}"
  489. endif
  490.  
  491. logSystemInfo "=== Graphics device info ==="
  492. logSystemInfo "Number: ${deviceNumber}"
  493. logSystemInfo "Name (driver): ${cardNameText}"
  494. if ($isCardFound)
  495. logSystemInfo "Name (database): ${cardName}"
  496. else
  497. logSystemInfo "Name (database): ${cardName} <<NOT FOUND IN DATABASE!>>"
  498. endif
  499. if ($isIntegratedChipset)
  500. logSystemInfo " (Integrated Chipset)"
  501. endif
  502. logSystemInfo "Vendor: ${cardVendor}"
  503. logSystemInfo "Chipset: ${cardChipset}"
  504. logSystemInfo "Driver: ${driverName}, Version: ${driverVersion}"
  505. logSystemInfo "Driver version: ${driverBuild}"
  506. logSystemInfo "Monitor: ${monitorName}"
  507. logSystemInfo "Monitor aspect: ${monitorAspect}, ${monitorAspectString}"
  508. logSystemInfo "Screen mode: ${screenWidth}x${screenHeight}x${screenBPP}BPP,${screenRefresh}Hz"
  509. if ($textureMemorySizeOK)
  510. logSystemInfo "Texture memory: ${textureMemory}MB"
  511. else
  512. logSystemInfo "Texture memory: ${textureMemory}MB <<OVERRIDE>>"
  513. endif
  514. logSystemInfo "HW T&L: Fixed function:${fixedFunctionHWTnL} Programmable:${maxVertexProgramVersionHWMajor}.${maxVertexProgramVersionHWMinor}"
  515. logSystemInfo "Pixel program: ${maxPixelProgramVersionMajor}.${maxPixelProgramVersionMinor}"
  516. logSystemInfo "Texture stages: ${textureStages}"
  517. logSystemInfo "AppControlledAA: ${appControlledAA}"
  518.  
  519.  
  520. #############################################################################
  521. #
  522. # UI Options
  523.  
  524. log $logGroup $logLevelDebug "Begin parsing option definitions"
  525.  
  526. option MaterialDetail
  527. setting $Low
  528. boolProp bumpMapping false
  529. intProp imageDataSizeReductionOnLoad 2
  530.  
  531. setting $Medium
  532. boolProp bumpMapping false
  533. intProp imageDataSizeReductionOnLoad 1
  534.  
  535. setting $High
  536. boolProp bumpMapping true
  537. intProp imageDataSizeReductionOnLoad 0
  538. end
  539.  
  540.  
  541. option ObjectDetail
  542. setting $Medium
  543. boolProp reduceBoneWeights true
  544. boolProp useLODs true
  545. intProp lodOverride 35
  546.  
  547. setting $High
  548. boolProp reduceBoneWeights false
  549. boolProp useLODs false
  550. intProp lodOverride 0
  551. end
  552.  
  553. option ObjectHiding
  554. setting $Off
  555. intProp renderInsideVisibleObjects 0
  556.  
  557. setting $On
  558. intProp renderInsideVisibleObjects 1
  559. end
  560.  
  561. option SnowOnGround
  562. setting $Off
  563. boolProp showSnowOnGround false
  564.  
  565. setting $On
  566. boolProp showSnowOnGround true
  567. end
  568.  
  569. option Shadows
  570. setting $Low
  571. boolProp simShadows false
  572. boolProp objectShadows false
  573. boolProp guob false
  574. boolProp heightMapShadows false
  575.  
  576. setting $Medium
  577. boolProp simShadows false
  578. boolProp objectShadows false
  579. boolProp guob true
  580. boolProp heightMapShadows true
  581.  
  582. setting $High
  583. boolProp simShadows true
  584. boolProp objectShadows true
  585. boolProp guob true
  586. boolProp heightMapShadows true
  587. end
  588.  
  589.  
  590. option OpaqueUI
  591. setting $Off
  592. boolProp renderOpaqueUI false
  593.  
  594. setting $On
  595. boolProp renderOpaqueUI true
  596. end
  597.  
  598.  
  599. option Reflection
  600. setting $Off
  601. boolProp reflectionWithExtraViewer false
  602. boolProp nhoodWaterReflection false
  603.  
  604. setting $On
  605. boolProp reflectionWithExtraViewer true
  606. boolProp nhoodWaterReflection true
  607. end
  608.  
  609.  
  610. option EffectsQuality
  611. setting $Low
  612. boolProp useEffects true
  613. floatProp particleDensity 1
  614. floatProp particleScale 1
  615. intProp maxParticlesTarget 2000
  616. intProp particleLODOffset 0 # subtracted from the zoom.
  617. intProp effectPriorityLevel 1
  618. boolProp enableOceanReflection false
  619.  
  620. setting $Medium
  621. boolProp useEffects true
  622. floatProp particleDensity 1
  623. floatProp particleScale 1
  624. intProp maxParticlesTarget 5000
  625. intProp particleLODOffset 0 # subtracted from the zoom.
  626. intProp effectPriorityLevel 2
  627. boolProp enableOceanReflection false
  628.  
  629. setting $High
  630. boolProp useEffects true
  631. floatProp particleDensity 1
  632. floatProp particleScale 1
  633. intProp maxParticlesTarget 10000
  634. intProp particleLODOffset 0 # subtracted from the zoom.
  635. intProp effectPriorityLevel 3
  636. boolProp enableOceanReflection true
  637. end
  638.  
  639.  
  640. option LightingQuality
  641. setting $Low
  642. boolProp lightingEnabled true
  643. boolProp portalLighting false
  644. boolProp floorAndWallNormalMapping false
  645. boolProp specHighlights false
  646.  
  647. setting $Medium
  648. boolProp lightingEnabled true
  649. boolProp portalLighting true
  650. boolProp floorAndWallNormalMapping false
  651. boolProp specHighlights true
  652.  
  653. setting $High
  654. boolProp lightingEnabled true
  655. boolProp portalLighting true
  656. boolProp floorAndWallNormalMapping true
  657. boolProp specHighlights true
  658. end
  659.  
  660.  
  661. option SoundQuality
  662. setting $Low
  663. intProp AudioPerformance 0
  664.  
  665. setting $Medium
  666. intProp AudioPerformance 1
  667.  
  668. setting $High
  669. intProp AudioPerformance 2
  670. end
  671.  
  672.  
  673. #
  674. # Options without ui access.
  675. #
  676. option DirtyRect
  677. setting $High
  678. # no dirty rects
  679. intProp dynamicRenderStrategy 0
  680.  
  681. setting $Medium
  682. # 4 buffer mode
  683. intProp dynamicRenderStrategy 2
  684.  
  685. setting $Low
  686. # 2 buffer mode
  687. intProp dynamicRenderStrategy 1
  688. end
  689.  
  690.  
  691. option FullscreenFadeEffect
  692. setting $Off
  693. boolProp enableSnapshot false
  694.  
  695. setting $On
  696. boolProp enableSnapshot true
  697. end
  698.  
  699.  
  700. option Turbo
  701. setting $High
  702. boolProp useTurboRect true
  703.  
  704. setting $Medium
  705. boolProp useTurboRect true
  706.  
  707. setting $Low
  708. boolProp useTurboRect false
  709.  
  710. end
  711.  
  712.  
  713. option SimulatorControls
  714. setting $High
  715. intProp maxNumOfVisitingSims 8
  716.  
  717. setting $Medium
  718. intProp maxNumOfVisitingSims 6
  719.  
  720. setting $Low
  721. intProp maxNumOfVisitingSims 2
  722. end
  723.  
  724.  
  725. option LightingOptimizations
  726. setting $High
  727. boolProp optimizedDiffusion true
  728. boolProp incrementalLighting true
  729. boolProp lerpLights true
  730. boolProp useDirtyTiles true
  731. end
  732.  
  733.  
  734. option AnimationSamplingLevel
  735. setting $Low
  736. # sample nearest animation frame
  737. boolProp animationFrameSampling true
  738.  
  739. setting $Medium
  740. # sample nearest two animation frames and slerp
  741. boolProp animationFrameSampling false
  742. end
  743.  
  744.  
  745. option LivePIP
  746. setting $Off
  747. boolProp livePIP false
  748. boolProp livePIPDefault false
  749.  
  750. setting $On
  751. boolProp livePIPDefault true
  752. # do not override user's choice if the setting is ON
  753. end
  754.  
  755.  
  756. option SpecialEventCamera
  757. setting $Off
  758. boolProp chooseCameraSpecialEventEnabled false
  759. boolProp CameraSpecialEventEnabled false
  760.  
  761. setting $On
  762. boolProp chooseCameraSpecialEventEnabled true
  763. # do not override user's choice if the setting is ON
  764.  
  765.  
  766. end
  767.  
  768.  
  769. option ScreenModeResolution
  770. setting $Low
  771. uintProp maxResWidth 800
  772. uintProp maxResHeight 600
  773. uintProp defaultResWidth 800
  774. uintProp defaultResHeight 600
  775.  
  776. setting $MediumButDefaultLow
  777. uintProp maxResWidth 1280
  778. uintProp maxResHeight 1024
  779. uintProp defaultResWidth 800
  780. uintProp defaultResHeight 600
  781.  
  782. setting $Medium
  783. uintProp maxResWidth 1280
  784. uintProp maxResHeight 1024
  785. uintProp defaultResWidth 1024
  786. uintProp defaultResHeight 768
  787.  
  788. setting $High
  789. uintProp maxResWidth 1600
  790. uintProp maxResHeight 1200
  791. uintProp defaultResWidth 1024
  792. uintProp defaultResHeight 768
  793. end
  794.  
  795. option SubjectTracking
  796. setting $Low
  797. floatProp centerTrackingDeadZoneMagnitude 70
  798.  
  799. setting $Medium
  800. floatProp centerTrackingDeadZoneMagnitude 30
  801.  
  802. setting $High
  803. floatProp centerTrackingDeadZoneMagnitude 30
  804. end
  805.  
  806. option EnableLotImpostersInLot
  807. setting $On
  808. boolProp enableLotImpostersInLot true
  809. setting $Off
  810. boolProp enableLotImpostersInLot false
  811. end
  812.  
  813. option EnableNeighborhoodOccupantsInLot
  814. setting $On
  815. boolProp enableNeighborhoodOccupantsInLot true
  816. setting $Off
  817. boolProp enableNeighborhoodOccupantsInLot false
  818. end
  819.  
  820. option LotSkirtSizeIncrease
  821. setting 0
  822. uintProp lotSkirtSizeIncrease 5
  823. setting 1
  824. uintProp lotSkirtSizeIncrease 9
  825. setting 2
  826. uintProp lotSkirtSizeIncrease 18
  827. setting 3
  828. uintProp lotSkirtSizeIncrease 36
  829. end
  830.  
  831. log $logGroup $logLevelDebug "Finished parsing option definitions"
  832.  
  833.  
  834. #############################################################################
  835. #
  836. # Hardware Rendering
  837. #
  838.  
  839. # This cannot be defined as a local variable, the if clause is still executed when
  840. # sw render path is taken and an exception generated that fails the parsing. Be
  841. # careful with the use of local variables.
  842. setb usingHighDetail false
  843.  
  844. if (not $useSoftwareRasterizer)
  845.  
  846. # set a base level of options based on the card rating
  847. if (($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings and not $isIntegratedChipset)
  848. log $logGroup $logLevelInfo "Selecting High base level"
  849.  
  850. setOption OpaqueUI $Off
  851. setOption LivePIP $On
  852. setOption Reflection $On
  853. setOption EffectsQuality $High
  854. setOption LightingQuality $High
  855. setOption Shadows $High
  856. setOption MaterialDetail $High
  857. setOption ObjectDetail $High
  858. setOption ObjectHiding $Off
  859. setOption SubjectTracking $High
  860. setOption EnableLotImpostersInLot $On
  861. setOption EnableNeighborhoodOccupantsInLot $On
  862. setOption LotSkirtSizeIncrease 1
  863. setb usingHighDetail true #use this to test if current level is set to high
  864.  
  865. elseif (($memory >= $memoryLevelMedium) and ($cpuSpeed >= $cpuLevelMedium) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings)
  866. log $logGroup $logLevelInfo "Selecting Medium base level"
  867.  
  868. setOption OpaqueUI $Off
  869. setOption LivePIP $On
  870. setOption Reflection $Off
  871. setOption EffectsQuality $Medium
  872. setOption LightingQuality $Medium
  873. setOption Shadows $Medium
  874. setOption MaterialDetail $Medium
  875. setOption ObjectDetail $High
  876. setOption ObjectHiding $On
  877. setOption SubjectTracking $Medium
  878. setOption EnableLotImpostersInLot $On
  879. setOption EnableNeighborhoodOccupantsInLot $On
  880. setOption LotSkirtSizeIncrease 0
  881.  
  882. else
  883. log $logGroup $logLevelInfo "Selecting Low base level"
  884. # NOTE: don't set forceLowSettings here, because this will force low simulator settings
  885. # if all you have is a low end video card
  886.  
  887. setOption OpaqueUI $Off
  888. setOption LivePIP $Off
  889. setOption Reflection $Off
  890. setOption EffectsQuality $Low
  891. setOption LightingQuality $Low
  892. setOption Shadows $Low
  893. setOption MaterialDetail $Low
  894. setOption ObjectDetail $Medium
  895. setOption ObjectHiding $On
  896. setOption SubjectTracking $Low
  897. setOption EnableLotImpostersInLot $Off
  898. setOption EnableNeighborhoodOccupantsInLot $Off
  899. setOption LotSkirtSizeIncrease 0
  900. endif
  901.  
  902. setOption LightingOptimizations $High
  903. setOption SnowOnGround $On
  904.  
  905. # adjust simulator based on cpu speed
  906. # adjust the sound quality based on cpu speed (this may be overridden below for low-end systems)
  907. # adjust animation sampling based on cpu speed
  908. if ($cpuSpeed >= $cpuLevelHigh and not $forceLowSettings)
  909. setOption SimulatorControls $High
  910. setOption SoundQuality $High
  911. setOption AnimationSamplingLevel $Medium
  912. elseif ($cpuSpeed >= $cpuLevelMedium and not $forceLowSettings)
  913. setOption SimulatorControls $Medium
  914. setOption SoundQuality $Medium
  915. setOption AnimationSamplingLevel $Medium
  916. else
  917. setOption SimulatorControls $Low
  918. setOption SoundQuality $Low
  919. setOption AnimationSamplingLevel $Low
  920. endif
  921.  
  922. # turn off fullscreen fade
  923. setOption FullscreenFadeEffect $Off
  924. if ($textureMemory >= 128 and not $isIntegratedChipset)
  925. setOption FullscreenFadeEffect $On
  926. endif
  927.  
  928. # screen res defaults
  929. if (($maxVertexProgramVersionHWMajor >= 1) and ($textureMemory >= 128) and not $forceLowResolution)
  930. setOption ScreenModeResolution $High
  931. elseif ($textureMemory >= 64 and not $forceLowResolution)
  932. if (($memory <= $memoryLevelLow) and ($cpuSpeed <= $cpuLevelLow))
  933. setOption ScreenModeResolution $MediumButDefaultLow
  934. else
  935. setOption ScreenModeResolution $Medium
  936. endif
  937. else
  938. setOption ScreenModeResolution $Low
  939. endif
  940.  
  941. if ($defaultLowResolution)
  942. setOption ScreenModeResolution $MediumButDefaultLow
  943. endif
  944.  
  945. # special event cameras for cinematics
  946. if (($maxPixelProgramVersionMajor >= 1) and ($supportsSpecialEventCamera))
  947. setOption SpecialEventCamera $On
  948. else
  949. setOption SpecialEventCamera $Off
  950. endif
  951.  
  952. # set dirty rect mode
  953. if ($supportsDirtyRect)
  954. setOption DirtyRect $Medium
  955. else
  956. setOption DirtyRect $High
  957. endif
  958.  
  959. # set turbo mode
  960. if ($supportsTurboRect)
  961. setOption Turbo $Medium
  962. else
  963. setOption Turbo $Low
  964. endif
  965.  
  966. if ($forceMediumMaterialDetail and ($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and not $forceLowSettings)
  967. log $logGroup $logLevelWarning "Setting Material Detail"
  968. setOption MaterialDetail $Medium
  969. endif
  970.  
  971. if ($usingHighDetail and not $forceLowSettings)
  972. if ($forceMediumShadows)
  973. setOption Shadows $Medium
  974. endif
  975.  
  976. if ($forceMediumObjectDetail)
  977. setOption ObjectDetail $Medium
  978. endif
  979. endif
  980.  
  981. endif
  982.  
  983.  
  984. #############################################################################
  985. #
  986. # Software rendering
  987. #
  988.  
  989. # set the options for the software rasterizer
  990. if ($useSoftwareRasterizer)
  991. setOption LightingOptimizations $High
  992.  
  993. setOption DirtyRect $Medium
  994. setOption Turbo $Medium
  995. setOption OpaqueUI $Off
  996. setOption LivePIP $Off
  997. setOption SpecialEventCamera $Off
  998.  
  999. setOption Reflection $Off
  1000. setOption EffectsQuality $Low
  1001. setOption LightingQuality $Low
  1002. setOption Shadows $Low
  1003. setOption MaterialDetail $Low
  1004. setOption ObjectDetail $Medium
  1005. setOption ObjectHiding $On
  1006.  
  1007. # adjust simulator based on cpu speed
  1008. if ($cpuSpeed >= $cpuLevelHigh)
  1009. setOption SimulatorControls $Medium # one lower than hw
  1010. else
  1011. setOption SimulatorControls $Low
  1012. endif
  1013.  
  1014. setOption SoundQuality $Low
  1015. setOption FullscreenFadeEffect $Off
  1016. setOption AnimationSamplingLevel $Low
  1017. setOption ScreenModeResolution $Low
  1018. setOption SubjectTracking $Low
  1019. setOption EnableLotImpostersInLot $Off
  1020. setOption EnableNeighborhoodOccupantsInLot $Off
  1021. setOption LotSkirtSizeIncrease 0
  1022. setOption SnowOnGround $On
  1023.  
  1024. endif
  1025.  
  1026.  
  1027. #############################################################################
  1028. # save the selected configuration for this device.
  1029.  
  1030. boolProp activeDeviceUseSoftwareRasterizer $useSoftwareRasterizer
  1031.  
  1032. #############################################################################
  1033. # tell the caller that we completely finished parsing the script
  1034. intProp configParserErrorCode 0
  1035.  
  1036. uintProp hwMajorPSVersion $maxPixelProgramVersionMajor
  1037.  
  1038. log $logGroup $logLevelInfo "Finished Config File"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement