1.9: Comments in .compositor scripts

Problems building or running the engine, queries about how to use features etc.
Post Reply
rogual
Gnoblar
Posts: 21
Joined: Sun Mar 01, 2015 9:33 pm
x 4

1.9: Comments in .compositor scripts

Post by rogual »

After upgrading to 1.9, some lines in my compositor scrips started being ignored until I removed all comments from them. For instance, I had this pass:

Code: Select all

            pass render_scene {
                first_render_queue 45 // floors
                last_render_queue 51 // walls
            }
... which stopped working properly and just rendered the entire scene, until I changed it to:

Code: Select all

            pass render_scene {
                first_render_queue 45 
                last_render_queue 51
            }
Is this a bug?
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: 1.9: Comments in .compositor scripts

Post by spacegaier »

I just tested it with Ogre 1.10 and confirm that there is an issue. As a test case I used Ogre's Black and White compositor. It however seems to make a difference where the comment is. Some comments do not disturb the script, others do.

Code: Select all

// Black and white effect
compositor B&W
{
    technique
    {
        texture rt0 target_width target_height PF_A8R8G8B8

        target rt0
        {		
            input previous // comment not an issue
        }

        target_output
        {		
            input none
			
            pass render_quad
            {
                material Ogre/Compositor/BlackAndWhite // comment IS an issue
                input 0 rt0 // comment not an issue
            }
        }
    }
}
Can you please create a JIRA ticket for this issue. Thank you.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: 1.9: Comments in .compositor scripts

Post by spacegaier »

Update: I found the cause and also a potential fix. Just testing a bit more to ensure that I do not accidentally break something else. Once I am rather certain and once you created the JIRA ticket, I will push the commit.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
rogual
Gnoblar
Posts: 21
Joined: Sun Mar 01, 2015 9:33 pm
x 4

Re: 1.9: Comments in .compositor scripts

Post by rogual »

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: 1.9: Comments in .compositor scripts

Post by spacegaier »

I just pushed a fix. Please re-test and then update the ticket with your results. Thank you.
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
Post Reply