FFP_TransformTexCoord compile error on IOS Android

Problems building or running the engine, queries about how to use features etc.
cww
Gnoblar
Posts: 15
Joined: Thu Nov 22, 2012 4:56 pm

FFP_TransformTexCoord compile error on IOS Android

Post by cww »

Hi all,

I had been using a dated OGRE3D branch 1.9 for IOS and Android, and recently refreshed it due to the release of RC1. After ironing out some rough edges, this last one persists.

Extracted log:
06-07 21:27:29.078: I/OGRE(8260): GLSL ES compile log: RTSS_75_VS
06-07 21:27:29.078: I/OGRE(8260): Compile failed.
06-07 21:27:29.078: I/OGRE(8260): ERROR: 0:60: 'FFP_TransformTexCoord' : no matching overloaded function found
06-07 21:27:29.078: I/OGRE(8260): ERROR: 1 compilation errors. No code generated.
06-07 21:27:29.078: I/OGRE(8260): GLSL ES compile log: RTSS_75_VS
The program that causes this (dumped via log):
06-07 21:27:29.063: I/OGRE(8260): #version 100
06-07 21:27:29.063: I/OGRE(8260): precision highp float;
06-07 21:27:29.063: I/OGRE(8260): precision highp int;
06-07 21:27:29.063: I/OGRE(8260): void FFP_Assign(in vec2 vIn, out vec2 vOut)
06-07 21:27:29.063: I/OGRE(8260): {
06-07 21:27:29.063: I/OGRE(8260): vOut = vIn;
06-07 21:27:29.063: I/OGRE(8260): }
06-07 21:27:29.063: I/OGRE(8260): void FFP_Construct(in float r, in float g, in float b, in float a, out vec4 vOut)
06-07 21:27:29.063: I/OGRE(8260): {
06-07 21:27:29.063: I/OGRE(8260): vOut = vec4(r,g,b,a);
06-07 21:27:29.063: I/OGRE(8260): }
06-07 21:27:29.063: I/OGRE(8260): void FFP_Transform(in mat4 m, in vec4 v, out vec4 vOut)
06-07 21:27:29.063: I/OGRE(8260): {
06-07 21:27:29.063: I/OGRE(8260): vOut = m * v;
06-07 21:27:29.063: I/OGRE(8260): }
06-07 21:27:29.063: I/OGRE(8260): uniform mat4 worldviewproj_matrix;
06-07 21:27:29.063: I/OGRE(8260): uniform float light_custom1;
06-07 21:27:29.063: I/OGRE(8260): attribute vec4 vertex;
06-07 21:27:29.063: I/OGRE(8260): attribute vec4 uv0;
06-07 21:27:29.063: I/OGRE(8260): varying vec2 oTexcoord2_0;
06-07 21:27:29.063: I/OGRE(8260): varying vec2 oTexcoord2_1;
06-07 21:27:29.063: I/OGRE(8260): void main() {
06-07 21:27:29.063: I/OGRE(8260): vec4 outputPosition;
06-07 21:27:29.063: I/OGRE(8260): vec4 lLocalParam_0;
06-07 21:27:29.063: I/OGRE(8260): vec4 lLocalParam_1;
06-07 21:27:29.063: I/OGRE(8260): FFP_Transform(worldviewproj_matrix, vertex, outputPosition);
06-07 21:27:29.063: I/OGRE(8260): FFP_Construct(1.0, 1.0, 1.0, 1.0, lLocalParam_0);
06-07 21:27:29.063: I/OGRE(8260): FFP_Construct(0.0, 0.0, 0.0, 0.0, lLocalParam_1);
06-07 21:27:29.063: I/OGRE(8260): FFP_Assign(uv0.xy, oTexcoord2_0);
06-07 21:27:29.063: I/OGRE(8260): FFP_TransformTexCoord(light_custom1, uv0.xy, oTexcoord2_1);
06-07 21:27:29.063: I/OGRE(8260): gl_Position = outputPosition;
06-07 21:27:29.063: I/OGRE(8260): }

These are the available FFP_TransformTexCoord functions defined in FFPLib_Texturing.glsles
//-----------------------------------------------------------------------------
void FFP_TransformTexCoord(in mat4 m, in vec2 v, out vec2 vOut)
{
vOut = (m * vec4(v, 1.0, 1.0)).xy;
}
//-----------------------------------------------------------------------------
void FFP_TransformTexCoord(in mat4 m, in vec4 v, out vec2 vOut)
{
vOut = (m * v).xy;
}

//-----------------------------------------------------------------------------
void FFP_TransformTexCoord(in mat4 m, in vec3 v, out vec3 vOut)
{
vOut = (m * vec4(v, 1.0)).xyz;
}
I am not familiar with the GLSL but it seems FFP_TransformTexCoord(light_custom1, uv0.xy, oTexcoord2_1), with light_custom1 == float, cannot be supported?

Any suggestion on how to resolve this will be appreciated. Thanks!
Last edited by cww on Sun Jun 09, 2013 6:07 am, edited 1 time in total.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: FFP_Transform compile error on IOS Android

Post by masterfalcon »

Yeah, that function doesn't exist for any shading language. Could you give us the material that this shader is generated from?
cww
Gnoblar
Posts: 15
Joined: Thu Nov 22, 2012 4:56 pm

Re: FFP_Transform compile error on IOS Android

Post by cww »

Hi masterfalcon,

Thanks for offering to help. It occurred when the cursor is over a button of SdkTray. Below should be the relevant material.

Code: Select all

material SdkTrays/Button/Over : SdkTrays/Base
{
    technique
    {
        pass
        {
            texture_unit
            {
                texture sdk_button_over.png
            }
			
		    texture_unit
			{
			    texture sdk_pulse.png
			    colour_op add
				scroll_anim 1 0
				scale 100 1
			}
        }
    }
}
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: FFP_Transform compile error on IOS Android

Post by masterfalcon »

Are you using SdkTrays in your own app or are you seeing this in the sample browser? If it's your own then we'll need some additional code that you're using to set up the scene.
cww
Gnoblar
Posts: 15
Joined: Thu Nov 22, 2012 4:56 pm

Re: FFP_Transform compile error on IOS Android

Post by cww »

Hi masterfalcon,

Thanks! I use a modified version of SdkTrays.h in my own app. To simplify the tracing, I reverted back to the stock SdkTrays.h, and tried removing all other scene objects (nothing added to scene manager) and just set up SdkTray to display the following.

Code: Select all

m_MultiTouch.setRenderWindow( m_pRenderWnd );
OgreBites::InputContext dummy;
dummy.mMultiTouch = &m_MultiTouch;
m_pTrayMgr = new OgreBites::SdkTrayManager("TrayMgr", m_pRenderWnd, dummy, this);
m_pTrayMgr->showFrameStats(GoBites::TL_TOPLEFT);
m_pTrayMgr->showLogo(GoBites::TL_BOTTOMRIGHT);
m_pButton = m_pTrayMgr->createButton( GoBites::TL_BOTTOMLEFT, "My Button", "Button" );
The same problem persists...
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: FFP_TransformTexCoord compile error on IOS Android

Post by masterfalcon »

I think I know what I broke. So I'll try to get a fix in soon.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: FFP_TransformTexCoord compile error on IOS Android

Post by masterfalcon »

Go for it with the latest code.
cww
Gnoblar
Posts: 15
Joined: Thu Nov 22, 2012 4:56 pm

Re: FFP_TransformTexCoord compile error on IOS Android

Post by cww »

Hi masterfalcon,

Thanks for the fix! I tested on Android and the issue is resolved. The iOS version is being compiled now, but I won't be able to test it until tomorrow. Will update again soon. Cheers!
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: FFP_TransformTexCoord compile error on IOS Android

Post by masterfalcon »

No problem. I can't believe that I screwed it up in the first place. iOS should be fine too. It affected the RTSS in general so GL3+ and DX11 also had the same problem.
cww
Gnoblar
Posts: 15
Joined: Thu Nov 22, 2012 4:56 pm

Re: FFP_TransformTexCoord compile error on IOS Android

Post by cww »

Yes it is fixed for iOS as well. Cheers!