Thanks for your reply guys, I tried to set the texture type as PBSM_DETAIL0 like so: -
Code: Select all
Ogre::HlmsDatablock *datablock = hlms->createDatablock("MirrorMat", "MirrorMat", Ogre::HlmsMacroblock(), Ogre::HlmsBlendblock(), Ogre::HlmsParamVec());
Ogre::HlmsUnlitDatablock *unlitDb = static_cast<Ogre::HlmsUnlitDatablock*>(datablock); // Texture is set in the resize method
unlitDb->setTexture(Ogre::PbsTextureTypes::PBSM_DETAIL0, 0, _texture);
I got a shader compilation error: -
Code: Select all
20:04:17: GLSL compile log: 1610678272PixelShader_ps
Fragment shader failed to compile with the following errors:
ERROR: 0:91: error(#143) Undeclared identifier: topImage1
ERROR: 0:91: error(#216) Vector field selection out of range "xyz"
ERROR: 0:91: error(#216) Vector field selection out of range "a"
ERROR: 0:91: error(#202) No matching overloaded function found: mix
ERROR: 0:91: error(#160) Cannot convert from: "const float" to: "highp 3-component vector of vec3"
ERROR: 0:92: error(#216) Vector field selection out of range "w"
ERROR: error(#273) 6 compilation errors. No code generated
20:04:17: OGRE EXCEPTION(3:RenderingAPIException): Fragment Program 1610678272PixelShader_ps failed to compile. See compile log above for details. in GLSLShader::compile at C:\Dev\3rdParty\cmake\Ogre\RenderSystems\GL3Plus\src\GLSL\OgreGLSLShader.cpp (line 297)
I haven't done much more than set the diffuse texture up to this point, how should I set the detail map?
I assume the scale should be set using: -
Code: Select all
setDetailMapOffsetScale(0, Vector4(0,0,-1,1))
Is this correct?
Thanks and sorry for the basic questions.