diff --git a/Docs/src/material-scripts.md b/Docs/src/material-scripts.md index ceddb088586..98518fb342b 100644 --- a/Docs/src/material-scripts.md +++ b/Docs/src/material-scripts.md @@ -217,19 +217,29 @@ When using @ref Texture_002dbased-Shadows you can specify an alternate material ## gpu\_vendor\_rule and gpu\_device\_rule -Although Ogre does a good job of detecting the capabilities of graphics cards and setting the supportability of techniques from that, occasionally card-specific behaviour exists which is not necessarily detectable and you may want to ensure that your materials go down a particular path to either use or avoid that behaviour. This is what these rules are for - you can specify matching rules so that a technique will be considered supportable only on cards from a particular vendor, or which match a device name pattern, or will be considered supported only if they **don’t** fulfil such matches. The format of the rules are as follows: +Although %Ogre does a good job of detecting the capabilities of graphics cards and setting the supportability of techniques from that, occasionally card-specific behaviour exists which is not necessarily detectable and you may want to ensure that your materials go down a particular path to either use or avoid that behaviour. This is what these rules are for - you can specify matching rules so that a technique will be considered supportable only on cards from a particular vendor, or which match a device name pattern, or will be considered supported only if they **don’t** fulfil such matches. The format of the rules are as follows: @par gpu\_vendor\_rule <include|exclude> <vendor\_name>
gpu\_device\_rule <include|exclude> <device\_pattern> \[case\_sensitive\] -An ’include’ rule means that the technique will only be supported if one of the include rules is matched (if no include rules are provided, anything will pass). An ’exclude’ rules means that the technique is considered unsupported if any of the exclude rules are matched. You can provide as many rules as you like, although <vendor\_name> and <device\_pattern> must obviously be unique. The valid list of <vendor\_name> values is currently ’nvidia’, ’ati’, ’intel’, ’s3’, ’matrox’ and ’3dlabs’. <device\_pattern> can be any string, and you can use wildcards (’\*’) if you need to match variants. Here’s an example: +@param include the technique will only be supported if one of the include rules is matched (if no include rules are provided, anything will pass). +@param exclude the technique is considered unsupported if any of the exclude rules are matched. +@param vendor_name values are as returned by Ogre::RenderSystemCapabilities::vendorToString +@param device_pattern can be any string, and you can use wildcards (’\*’) if you need to match variants. -@par -gpu\_vendor\_rule include nvidia
gpu\_vendor\_rule include intel
gpu\_device\_rule exclude \*950\* +You can provide as many rules as you like, although <vendor\_name> and <device\_pattern> must obviously be unique. + +Here’s an example: + +``` +gpu_vendor_rule include nvidia +gpu_vendor_rule include intel +gpu_device_rule exclude *950* +``` These rules, if all included in one technique, will mean that the technique will only be considered supported on graphics cards made by NVIDIA and Intel, and so long as the device name doesn’t have ’950’ in it. -Note that these rules can only mark a technique ’unsupported’ when it would otherwise be considered ’supported’ judging by the hardware capabilities. Even if a technique passes these rules, it is still subject to the usual hardware support tests. +@note these rules can only mark a technique ’unsupported’ when it would otherwise be considered ’supported’ judging by the hardware capabilities. Even if a technique passes these rules, it is still subject to the usual hardware support tests. # Passes {#Passes}