Guest User

graphics rule

a guest
Apr 16th, 2020
29
140 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. option Ceiling
  610. setting $Off
  611. boolProp includeCeilings false
  612.  
  613. setting $On
  614. boolProp includeCeilings true
  615. end
  616.  
  617. option EffectsQuality
  618. setting $Low
  619. boolProp useEffects true
  620. floatProp particleDensity 1
  621. floatProp particleScale 1
  622. intProp maxParticlesTarget 2000
  623. intProp particleLODOffset 0 # subtracted from the zoom.
  624. intProp effectPriorityLevel 1
  625. boolProp enableOceanReflection false
  626.  
  627. setting $Medium
  628. boolProp useEffects true
  629. floatProp particleDensity 1
  630. floatProp particleScale 1
  631. intProp maxParticlesTarget 5000
  632. intProp particleLODOffset 0 # subtracted from the zoom.
  633. intProp effectPriorityLevel 2
  634. boolProp enableOceanReflection false
  635.  
  636. setting $High
  637. boolProp useEffects true
  638. floatProp particleDensity 1
  639. floatProp particleScale 1
  640. intProp maxParticlesTarget 10000
  641. intProp particleLODOffset 0 # subtracted from the zoom.
  642. intProp effectPriorityLevel 3
  643. boolProp enableOceanReflection true
  644. end
  645.  
  646.  
  647. option LightingQuality
  648. setting $Low
  649. boolProp lightingEnabled true
  650. boolProp portalLighting false
  651. boolProp floorAndWallNormalMapping false
  652. boolProp specHighlights false
  653.  
  654. setting $Medium
  655. boolProp lightingEnabled true
  656. boolProp portalLighting true
  657. boolProp floorAndWallNormalMapping false
  658. boolProp specHighlights true
  659.  
  660. setting $High
  661. boolProp lightingEnabled true
  662. boolProp portalLighting true
  663. boolProp floorAndWallNormalMapping true
  664. boolProp specHighlights true
  665. end
  666.  
  667.  
  668. option SoundQuality
  669. setting $Low
  670. intProp AudioPerformance 0
  671.  
  672. setting $Medium
  673. intProp AudioPerformance 1
  674.  
  675. setting $High
  676. intProp AudioPerformance 2
  677. end
  678.  
  679.  
  680. #
  681. # Options without ui access.
  682. #
  683. option DirtyRect
  684. setting $High
  685. # no dirty rects
  686. intProp dynamicRenderStrategy 0
  687.  
  688. setting $Medium
  689. # 4 buffer mode
  690. intProp dynamicRenderStrategy 2
  691.  
  692. setting $Low
  693. # 2 buffer mode
  694. intProp dynamicRenderStrategy 1
  695. end
  696.  
  697.  
  698. option FullscreenFadeEffect
  699. setting $Off
  700. boolProp enableSnapshot false
  701.  
  702. setting $On
  703. boolProp enableSnapshot true
  704. end
  705.  
  706.  
  707. option Turbo
  708. setting $High
  709. boolProp useTurboRect true
  710.  
  711. setting $Medium
  712. boolProp useTurboRect true
  713.  
  714. setting $Low
  715. boolProp useTurboRect false
  716.  
  717. end
  718.  
  719.  
  720. option SimulatorControls
  721. setting $High
  722. intProp maxNumOfVisitingSims 8
  723.  
  724. setting $Medium
  725. intProp maxNumOfVisitingSims 6
  726.  
  727. setting $Low
  728. intProp maxNumOfVisitingSims 2
  729. end
  730.  
  731.  
  732. option LightingOptimizations
  733. setting $High
  734. boolProp optimizedDiffusion true
  735. boolProp incrementalLighting true
  736. boolProp lerpLights true
  737. boolProp useDirtyTiles true
  738. end
  739.  
  740.  
  741. option AnimationSamplingLevel
  742. setting $Low
  743. # sample nearest animation frame
  744. boolProp animationFrameSampling true
  745.  
  746. setting $Medium
  747. # sample nearest two animation frames and slerp
  748. boolProp animationFrameSampling false
  749. end
  750.  
  751.  
  752. option LivePIP
  753. setting $Off
  754. boolProp livePIP false
  755. boolProp livePIPDefault false
  756.  
  757. setting $On
  758. boolProp livePIPDefault true
  759. # do not override user's choice if the setting is ON
  760. end
  761.  
  762.  
  763. option SpecialEventCamera
  764. setting $Off
  765. boolProp chooseCameraSpecialEventEnabled false
  766. boolProp CameraSpecialEventEnabled false
  767.  
  768. setting $On
  769. boolProp chooseCameraSpecialEventEnabled true
  770. # do not override user's choice if the setting is ON
  771.  
  772.  
  773. end
  774.  
  775.  
  776. option ScreenModeResolution
  777. setting $Low
  778. uintProp maxResWidth 800
  779. uintProp maxResHeight 600
  780. uintProp defaultResWidth 800
  781. uintProp defaultResHeight 600
  782.  
  783. setting $MediumButDefaultLow
  784. uintProp maxResWidth 1280
  785. uintProp maxResHeight 1024
  786. uintProp defaultResWidth 800
  787. uintProp defaultResHeight 600
  788.  
  789. setting $Medium
  790. uintProp maxResWidth 1280
  791. uintProp maxResHeight 1024
  792. uintProp defaultResWidth 1024
  793. uintProp defaultResHeight 768
  794.  
  795. setting $High
  796. uintProp maxResWidth 1600
  797. uintProp maxResHeight 1200
  798. uintProp defaultResWidth 1024
  799. uintProp defaultResHeight 768
  800. end
  801.  
  802. option SubjectTracking
  803. setting $Low
  804. floatProp centerTrackingDeadZoneMagnitude 70
  805.  
  806. setting $Medium
  807. floatProp centerTrackingDeadZoneMagnitude 30
  808.  
  809. setting $High
  810. floatProp centerTrackingDeadZoneMagnitude 30
  811. end
  812.  
  813. option EnableLotImpostersInLot
  814. setting $On
  815. boolProp enableLotImpostersInLot true
  816. setting $Off
  817. boolProp enableLotImpostersInLot false
  818. end
  819.  
  820. option EnableNeighborhoodOccupantsInLot
  821. setting $On
  822. boolProp enableNeighborhoodOccupantsInLot true
  823. setting $Off
  824. boolProp enableNeighborhoodOccupantsInLot false
  825. end
  826.  
  827. option LotSkirtSizeIncrease
  828. setting 0
  829. uintProp lotSkirtSizeIncrease 5
  830. setting 1
  831. uintProp lotSkirtSizeIncrease 9
  832. setting 2
  833. uintProp lotSkirtSizeIncrease 18
  834. setting 3
  835. uintProp lotSkirtSizeIncrease 36
  836. end
  837.  
  838. log $logGroup $logLevelDebug "Finished parsing option definitions"
  839.  
  840.  
  841. #############################################################################
  842. #
  843. # Hardware Rendering
  844. #
  845.  
  846. # This cannot be defined as a local variable, the if clause is still executed when
  847. # sw render path is taken and an exception generated that fails the parsing. Be
  848. # careful with the use of local variables.
  849. setb usingHighDetail false
  850.  
  851. if (not $useSoftwareRasterizer)
  852.  
  853. # set a base level of options based on the card rating
  854. if (($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings and not $isIntegratedChipset)
  855. log $logGroup $logLevelInfo "Selecting High base level"
  856.  
  857. setOption OpaqueUI $Off
  858. setOption LivePIP $On
  859. setOption Reflection $On
  860. setOption Ceiling $On
  861. setOption EffectsQuality $High
  862. setOption LightingQuality $High
  863. setOption Shadows $High
  864. setOption MaterialDetail $High
  865. setOption ObjectDetail $High
  866. setOption ObjectHiding $Off
  867. setOption SubjectTracking $High
  868. setOption EnableLotImpostersInLot $On
  869. setOption EnableNeighborhoodOccupantsInLot $On
  870. setOption LotSkirtSizeIncrease 1
  871. setb usingHighDetail true #use this to test if current level is set to high
  872.  
  873. elseif (($memory >= $memoryLevelMedium) and ($cpuSpeed >= $cpuLevelMedium) and ($maxVertexProgramVersionHWMajor >= 1) and not $forceLowSettings)
  874. log $logGroup $logLevelInfo "Selecting Medium base level"
  875.  
  876. setOption OpaqueUI $Off
  877. setOption LivePIP $On
  878. setOption Reflection $Off
  879. setOption Ceiling $Off
  880. setOption EffectsQuality $Medium
  881. setOption LightingQuality $Medium
  882. setOption Shadows $Medium
  883. setOption MaterialDetail $Medium
  884. setOption ObjectDetail $High
  885. setOption ObjectHiding $On
  886. setOption SubjectTracking $Medium
  887. setOption EnableLotImpostersInLot $On
  888. setOption EnableNeighborhoodOccupantsInLot $On
  889. setOption LotSkirtSizeIncrease 0
  890.  
  891. else
  892. log $logGroup $logLevelInfo "Selecting Low base level"
  893. # NOTE: don't set forceLowSettings here, because this will force low simulator settings
  894. # if all you have is a low end video card
  895.  
  896. setOption OpaqueUI $Off
  897. setOption LivePIP $Off
  898. setOption Reflection $Off
  899. setOption Ceiling $Off
  900. setOption EffectsQuality $Low
  901. setOption LightingQuality $Low
  902. setOption Shadows $Low
  903. setOption MaterialDetail $Low
  904. setOption ObjectDetail $Medium
  905. setOption ObjectHiding $On
  906. setOption SubjectTracking $Low
  907. setOption EnableLotImpostersInLot $Off
  908. setOption EnableNeighborhoodOccupantsInLot $Off
  909. setOption LotSkirtSizeIncrease 0
  910. endif
  911.  
  912. setOption LightingOptimizations $High
  913. setOption SnowOnGround $On
  914.  
  915. # adjust simulator based on cpu speed
  916. # adjust the sound quality based on cpu speed (this may be overridden below for low-end systems)
  917. # adjust animation sampling based on cpu speed
  918. if ($cpuSpeed >= $cpuLevelHigh and not $forceLowSettings)
  919. setOption SimulatorControls $High
  920. setOption SoundQuality $High
  921. setOption AnimationSamplingLevel $Medium
  922. elseif ($cpuSpeed >= $cpuLevelMedium and not $forceLowSettings)
  923. setOption SimulatorControls $Medium
  924. setOption SoundQuality $Medium
  925. setOption AnimationSamplingLevel $Medium
  926. else
  927. setOption SimulatorControls $Low
  928. setOption SoundQuality $Low
  929. setOption AnimationSamplingLevel $Low
  930. endif
  931.  
  932. # turn off fullscreen fade
  933. setOption FullscreenFadeEffect $Off
  934. if ($textureMemory >= 128 and not $isIntegratedChipset)
  935. setOption FullscreenFadeEffect $On
  936. endif
  937.  
  938. # screen res defaults
  939. if (($maxVertexProgramVersionHWMajor >= 1) and ($textureMemory >= 128) and not $forceLowResolution)
  940. setOption ScreenModeResolution $High
  941. elseif ($textureMemory >= 64 and not $forceLowResolution)
  942. if (($memory <= $memoryLevelLow) and ($cpuSpeed <= $cpuLevelLow))
  943. setOption ScreenModeResolution $MediumButDefaultLow
  944. else
  945. setOption ScreenModeResolution $Medium
  946. endif
  947. else
  948. setOption ScreenModeResolution $Low
  949. endif
  950.  
  951. if ($defaultLowResolution)
  952. setOption ScreenModeResolution $MediumButDefaultLow
  953. endif
  954.  
  955. # special event cameras for cinematics
  956. if (($maxPixelProgramVersionMajor >= 1) and ($supportsSpecialEventCamera))
  957. setOption SpecialEventCamera $On
  958. else
  959. setOption SpecialEventCamera $Off
  960. endif
  961.  
  962. # set dirty rect mode
  963. if ($supportsDirtyRect)
  964. setOption DirtyRect $Medium
  965. else
  966. setOption DirtyRect $High
  967. endif
  968.  
  969. # set turbo mode
  970. if ($supportsTurboRect)
  971. setOption Turbo $Medium
  972. else
  973. setOption Turbo $Low
  974. endif
  975.  
  976. if ($forceMediumMaterialDetail and ($memory >= $memoryLevelHigh) and ($cpuSpeed >= $cpuLevelHigh) and not $forceLowSettings)
  977. log $logGroup $logLevelWarning "Setting Material Detail"
  978. setOption MaterialDetail $Medium
  979. endif
  980.  
  981. if ($usingHighDetail and not $forceLowSettings)
  982. if ($forceMediumShadows)
  983. setOption Shadows $Medium
  984. endif
  985.  
  986. if ($forceMediumObjectDetail)
  987. setOption ObjectDetail $Medium
  988. endif
  989. endif
  990.  
  991. endif
  992.  
  993.  
  994. #############################################################################
  995. #
  996. # Software rendering
  997. #
  998.  
  999. # set the options for the software rasterizer
  1000. if ($useSoftwareRasterizer)
  1001. setOption LightingOptimizations $High
  1002.  
  1003. setOption DirtyRect $Medium
  1004. setOption Turbo $Medium
  1005. setOption OpaqueUI $Off
  1006. setOption LivePIP $Off
  1007. setOption SpecialEventCamera $Off
  1008.  
  1009. setOption Reflection $Off
  1010. setOption Ceiling $Off
  1011. setOption EffectsQuality $Low
  1012. setOption LightingQuality $Low
  1013. setOption Shadows $Low
  1014. setOption MaterialDetail $Low
  1015. setOption ObjectDetail $Medium
  1016. setOption ObjectHiding $On
  1017.  
  1018. # adjust simulator based on cpu speed
  1019. if ($cpuSpeed >= $cpuLevelHigh)
  1020. setOption SimulatorControls $Medium # one lower than hw
  1021. else
  1022. setOption SimulatorControls $Low
  1023. endif
  1024.  
  1025. setOption SoundQuality $Low
  1026. setOption FullscreenFadeEffect $Off
  1027. setOption AnimationSamplingLevel $Low
  1028. setOption ScreenModeResolution $Low
  1029. setOption SubjectTracking $Low
  1030. setOption EnableLotImpostersInLot $Off
  1031. setOption EnableNeighborhoodOccupantsInLot $Off
  1032. setOption LotSkirtSizeIncrease 0
  1033. setOption SnowOnGround $On
  1034.  
  1035. endif
  1036.  
  1037.  
  1038. #############################################################################
  1039. # save the selected configuration for this device.
  1040.  
  1041. boolProp activeDeviceUseSoftwareRasterizer $useSoftwareRasterizer
  1042.  
  1043. #############################################################################
  1044. # tell the caller that we completely finished parsing the script
  1045. intProp configParserErrorCode 0
  1046.  
  1047. uintProp hwMajorPSVersion $maxPixelProgramVersionMajor
  1048.  
  1049. log $logGroup $logLevelInfo "Finished Config File"
RAW Paste Data