Guest User

Graphics Rules.sgr

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