Compositor script syntax

Problems building or running the engine, queries about how to use features etc.
claustre
Goblin
Posts: 278
Joined: Thu Mar 23, 2006 10:35 am
Location: Toulouse, France

Compositor script syntax

Post 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...
User avatar
sinbad
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 19269
Joined: Sun Oct 06, 2002 11:19 pm
Location: Guernsey, Channel Islands
x 67

Post 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.
claustre
Goblin
Posts: 278
Joined: Thu Mar 23, 2006 10:35 am
Location: Toulouse, France

Post by claustre »

Ah OK thanks, I did not notice that in the manual sorry...