VertexShader Errors

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Lax
Gnoll
Posts: 644
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 59

VertexShader Errors

Post by Lax »

Hi @dark_sylinc,

I updated to the newest OgreNext version and now getting those VertexShader errors:

Code: Select all

12:28:30: OGRE EXCEPTION(-2147467259:RenderingAPIException): Cannot compile D3D11 high-level shader 700000000VertexShader_vs Errors:
(577,24-39): error X3004: undeclared identifier 'worldMaterialIdx'
 in D3D11HLSLProgram::compileMicrocode at E:\Ogre2.2SDK\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 558)
12:28:30: High-level program 700000000VertexShader_vs encountered an error during loading and is thus not supported.
OGRE EXCEPTION(-2147467259:RenderingAPIException): Cannot compile D3D11 high-level shader 700000000VertexShader_vs Errors:
(577,24-39): error X3004: undeclared identifier 'worldMaterialIdx'
 in D3D11HLSLProgram::compileMicrocode at E:\Ogre2.2SDK\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 558)
12:28:30: OGRE EXCEPTION(-2147467259:RenderingAPIException): Cannot compile D3D11 high-level shader 700000001VertexShader_vs Errors:
(604,24-39): error X3004: undeclared identifier 'worldMaterialIdx'
 in D3D11HLSLProgram::compileMicrocode at E:\Ogre2.2SDK\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 558)
12:28:30: High-level program 700000001VertexShader_vs encountered an error during loading and is thus not supported.
OGRE EXCEPTION(-2147467259:RenderingAPIException): Cannot compile D3D11 high-level shader 700000001VertexShader_vs Errors:
(604,24-39): error X3004: undeclared identifier 'worldMaterialIdx'
 in D3D11HLSLProgram::compileMicrocode at E:\Ogre2.2SDK\RenderSystems\Direct3D11\src\OgreD3D11HLSLProgram.cpp (line 558)

Note: If I deactivate Terra, everything works fine. Hence It has something todo with the terra Hmls?

How can this be solved?

Also please take a look at this topic:

viewtopic.php?t=97262

As it would be a really nice feature for ogre supporting splitscreen :D

Best Regards
Lax

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5433
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1341

Re: VertexShader Errors

Post by dark_sylinc »

Hi!

There were not many meaningful changes to Terra, but it sounds like your copy of the Hlms templates got out of date.

Can you upload the generated shaders to take a peek?

Lax
Gnoll
Posts: 644
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 59

Re: VertexShader Errors

Post by Lax »

Hi,

I checked all hlms files via winmerge again and there is no difference...

I added the debugged vertex and and pixelshader, which hopefully will discover the issue.

https://www.lukas-kalinowski.com/Homepa ... /Debug.zip

There are some files, but according to the error message, the 700000000VertexShader_vs is the correct one.
It says, the worldMaterialIdx is unknown and indeed searching in the Ogre project space, the only lines I could find are this one:

Code: Select all

// uint worldMaterialIdx[]
*currentMappedConstBuffer = datablock->getAssignedSlot() & 0x1FF;

Best Regards
Lax

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

Lax
Gnoll
Posts: 644
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 59

Re: VertexShader Errors

Post by Lax »

Edit: Oh, the Ogre Sample_Tutorial_Terrain.exe shows the same vertex error^^

I think something seems to be broken on Ogre side. Hope that information helps.

Best Regards
Lax

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5433
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1341

Re: VertexShader Errors

Post by dark_sylinc »

Fixed.

It was the CMake setting OGRE_CONFIG_ENABLE_FINE_LIGHT_MASK_GRANULARITY that was causing this crash.

Thanks for the report!

Cheers

Lax
Gnoll
Posts: 644
Joined: Mon Aug 06, 2007 12:53 pm
Location: Saarland, Germany
x 59

Re: VertexShader Errors

Post by Lax »

You're welcome :)

I hope you will find time, in order to look into the splitscreen quad topic. It would be such a nice feature, having multiple cameras running on splitscreen for multiplayer games. I'm working on a kind of physics mario card scenario and being stuck with the split screen quad topic.

See previous topic:
viewtopic.php?t=97262

I also extracted a renderdoc file there.

Best Regards
Lax

http://www.lukas-kalinowski.com/Homepage/?page_id=1631
Please support Second Earth Technic Base built of Lego bricks for Lego ideas: https://ideas.lego.com/projects/81b9bd1 ... b97b79be62