Page 1 of 1

Compositor script syntax

Posted: Fri May 05, 2006 10:17 am
by claustre
I am trying to use a clear pass within a compositor script with no success and I can't find any example around. This does not compile :

Code: Select all

...
target ZBuffer
{
    material_scheme ZWrite

    pass clear
    {
         buffers colour
         colour_value 1 1 1 1
    }
    pass render_scene
    {
    }
}
...
Error :

Code: Select all

*** ERROR in : Compositor Script
Source: adaptive-anti-aliasing.compositor
Unkown token found, was expecting:  '}'
 Found: >>>buffers colour
     <<<, while in rule path: <Pass>
Last valid token found was at line: 20
source hint: >>>{
                bu<<<
*** ERROR in : Compositor Script
Source: adaptive-anti-aliasing.compositor
Unkown token found, was expecting:  '}'
 Found: >>>buffers colour
     <<<, while in rule path: <Target>
Last valid token found was at line: 20
source hint: >>>{
                bu<<<
*** ERROR in : Compositor Script
Source: adaptive-anti-aliasing.compositor
Unkown token found, was expecting:  <TargetOutput> '}'
 Found: >>>buffers colour
     <<<, while in rule path: <Technique>
Last valid token found was at line: 20
source hint: >>>{
                bu<<<
*** ERROR in : Compositor Script
Source: adaptive-anti-aliasing.compositor
Unkown token found, was expecting:  '}'
 Found: >>>buffers colour
     <<<, while in rule path: <Compositor>
Last valid token found was at line: 20
source hint: >>>{
                bu<<<
Any help is welcome...

Posted: Fri May 05, 2006 5:31 pm
by sinbad
Manual section


Clear settings have their own section within a pass to avoid having to add the word 'clear' onto the front of all the params. ie

Code: Select all


    pass clear
    {
         clear 
         {
              buffers colour
              colour_value 1 1 1 1
         }
    }
I know that looks a bit like restating the 'clear' but that's because there's no other settings in the pass.

Posted: Fri May 05, 2006 5:35 pm
by claustre
Ah OK thanks, I did not notice that in the manual sorry...