Hi, I think in the implementation of D3D11HLSLProgram::getLayoutForPso there is missing check for VES_SPECULAR.
The D3D11Mappings::get(VES_SPECULAR) returns "COLOR" - the same value as for VES_DIFFUSE, but below the VES_SPECULAR is not checked and hence SemanticIndex is not properly incremented.
D3D11HLSLProgram::getLayoutForPso missing VES_SPECULAR
-
- Goblin
- Posts: 299
- Joined: Thu Apr 26, 2007 11:43 am
- Location: Slovakia / Switzerland
- x 11
-
- OGRE Team Member
- Posts: 5433
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1341
Re: D3D11HLSLProgram::getLayoutForPso missing VES_SPECULAR
A bigger question I'm now asking myself is why does VES_SPECULAR still exist?
I vaguely remember leaving it for backwards compatibility reasons when porting from 1.x.
It is troublesome because its real meaning only makes sense in the fixed function pipeline where lighting was calculated per vertex. From a shader POV VES_SPECULAR is no different from an additional set of VES_TEXTURE_COORDINATES.
If we go down to source code, only OpenGL & Metal are supporting it.
EDIT: I was wrong. Vulkan supports it too.
Are you ok with me marking it as deprecated instead of implementing it? Or were you planning on using it?
Cheers
-
- OGRE Team Member
- Posts: 5433
- Joined: Sat Jul 21, 2007 4:55 pm
- Location: Buenos Aires, Argentina
- x 1341
Re: D3D11HLSLProgram::getLayoutForPso missing VES_SPECULAR
Ah nevermind. I pushed a fix. Thanks!
I still kinda want to deprecate it. Thoughts?
-
- Goblin
- Posts: 299
- Joined: Thu Apr 26, 2007 11:43 am
- Location: Slovakia / Switzerland
- x 11
Re: D3D11HLSLProgram::getLayoutForPso missing VES_SPECULAR
For me it is perfectly ok to deprecate it. I have no intention of using it I looked there in the function due to other reasons and only spotted it there.