"default" on Ogre2.1/D3D11?

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 67
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

"default" on Ogre2.1/D3D11?

Postby mmixLinus » Tue Sep 19, 2017 20:22

Hi, On Win x64, I get

Code: Select all

Cannot compile D3D11 high-level shader __cegui_internal_texture_ps__ Errors:
(11,13-31): error X3523: DX9-style intrinsics are disabled when not in dx9 compatibility mode.
and

Code: Select all

High-level program __cegui_internal_colour_ps__ encountered an error during loading and is thus not supported.
OGRE EXCEPTION(-2147467259:RenderingAPIException): Cannot compile D3D11 high-level shader __cegui_internal_colour_ps__ Errors:
(9,27-33): error X4502: invalid ps_5_0 output semantic 'COLOR'
at startup. Do I need to add dx9 compatibility mode to the microcode compiler, or is the Cegui ("default" branch) shader not ready for this yet? Or something else? :) Maybe go for OpenGl3+..?

This happens when constructing the OgreRenderer, specifically initialiseShaders();

<3 /mmixLinus

User avatar
Ident
CEGUI Team
Posts: 1807
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: "default" on Ogre2.1/D3D11?

Postby Ident » Tue Sep 19, 2017 20:29

Cegui version? Ogre version?
CrazyEddie: "I don't like GUIs"

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 67
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: "default" on Ogre2.1/D3D11?

Postby mmixLinus » Wed Sep 20, 2017 08:02

The title says it all :)
And I'll post the log file too (soon) :oops:

CEGUI branch default (= 1.0) "latest" with OgreRenderer.
Ogre 2.1 "latest" with D3D11 renderer

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 67
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: "default" on Ogre2.1/D3D11?

Postby mmixLinus » Wed Sep 20, 2017 14:54

Oh yes, now I remember why I didn't post the log..

Code: Select all

20/09/2017 16:49:33 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
20/09/2017 16:49:33 (Std)    +                     Crazy Eddie's GUI System - Event log                    +
20/09/2017 16:49:33 (Std)    +                          (http://www.cegui.org.uk/)                         +
20/09/2017 16:49:33 (Std)    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

20/09/2017 16:49:33 (Std)    CEGUI::Logger Singleton created. (0000000005CD5730)
20/09/2017 16:49:33 (Std)    
20/09/2017 16:49:33 (Std)    ********************************************************************************
20/09/2017 16:49:33 (Std)    * Important:                                                                   *
20/09/2017 16:49:33 (Std)    *     To get support at the CEGUI forums, you must post _at least_ the section *
20/09/2017 16:49:33 (Std)    *     of this log file indicated below.  Failure to do this will result in no  *
20/09/2017 16:49:33 (Std)    *     support being given; please do not waste our time.                       *
20/09/2017 16:49:33 (Std)    ********************************************************************************
20/09/2017 16:49:33 (Std)    ********************************************************************************
20/09/2017 16:49:33 (Std)    * -------- START OF ESSENTIAL SECTION TO BE POSTED ON THE FORUM       -------- *
20/09/2017 16:49:33 (Std)    ********************************************************************************
20/09/2017 16:49:33 (Std)    ---- Version: 9999.0.0 (Build: Sep 19 2017 Debug Microsoft Windows MSVC++ 12.0 (2013) 64 bit) ----
20/09/2017 16:49:33 (Std)    ---- Renderer module is: CEGUI::OgreRenderer - OGRE based 3rd generation renderer module with Ogre::Compositor2 enabled. ----
The problem arises quite early, in OgreRenderer::constructor_impl() - so that's all there is.

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 67
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: "default" on Ogre2.1/D3D11?

Postby mmixLinus » Wed Sep 20, 2017 14:56

Meh,.. I was running Ogre v2.1, but not latest it turns out. I'll respin and get back.
Last edited by mmixLinus on Wed Sep 20, 2017 20:10, edited 1 time in total.

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 67
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: "default" on Ogre2.1/D3D11?

Postby mmixLinus » Wed Sep 20, 2017 18:05

No difference with latest Ogre 2.1.
CEGUI's pixel shader

Code: Select all

uniform float alphaPercentage;
struct VS_OUT
{
   float4 position : POSITION;
   float4 colour : COLOR;
   float2 uv : TexCoord0;
};
float4 main(float4 colour : COLOR, float2 uv : TexCoord0,                uniform sampler2D texture0 : TEXUNIT0) : COLOR
{
   colour = tex2D(texture0, uv) * colour;
   colour.a *= alphaPercentage;
   return colour;
}
is part of the problem. In the OgreShaderWrapper constructor, in the code

Code: Select all

    const Ogre::GpuConstantDefinitionMap& pixel_map =
        d_pixelShader->getConstantDefinitions().map;

    Ogre::GpuConstantDefinitionMap::const_iterator target2 =
        pixel_map.find("alphaPercentage");
pixel_map is empty, so the find() fails, and OgreShaderWrapper() subsequently throws.

User avatar
Ident
CEGUI Team
Posts: 1807
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: "default" on Ogre2.1/D3D11?

Postby Ident » Wed Sep 20, 2017 22:17

Do you mind trying with CEGUI v0-8 ? Just trying for now, because I know that different ppl made PRs on those two branches and support for Ogre may differ at this point.
CrazyEddie: "I don't like GUIs"

User avatar
mmixLinus
Quite a regular
Quite a regular
Posts: 67
Joined: Fri May 20, 2011 08:46
Location: Lund, Sweden
Contact:

Re: "default" on Ogre2.1/D3D11?

Postby mmixLinus » Thu Sep 21, 2017 08:11

I was initially on v0-8 (latest) but having problems, so I decided to try with the default branch. Actually, v0-8 got much further, and that problem was more related to parsing XML resources. I will give v0-8 another shot. For "default", I'll also see if I can select a different Shader Model for the D3D11 compiler, and see if I get further. :)

User avatar
Ident
CEGUI Team
Posts: 1807
Joined: Sat Oct 31, 2009 13:57
Location: Austria

Re: "default" on Ogre2.1/D3D11?

Postby Ident » Thu Sep 21, 2017 17:17

Ogre 2.0 and Ogre 2.1 support is entirely based on user contributions :)
CrazyEddie: "I don't like GUIs"


Return to “Help”

Who is online

Users browsing this forum: No registered users and 1 guest