Guest User

Graphics Rules

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