OgreHlms.cpp: https://github.com/OGRECave/ogre-next/b ... reHlms.cpp
Code: Select all
ForwardPlusBase *forwardPlus = sceneManager->_getActivePassForwardPlus();
if( forwardPlus )
forwardPlus->setHlmsPassProperties( this );
if( mShaderFileExt == ".glsl" )
{
//Actually the problem is not texture flipping, but origin. In D3D11,
//we need to always flip because origin is different, but it's consistent
//between texture and render window. In GL, RenderWindows don't need
//to flip, but textures do.
const RenderPassDescriptor *renderPassDesc = mRenderSystem->getCurrentPassDescriptor();
setProperty( HlmsBaseProp::ForwardPlusFlipY, renderPassDesc->requiresTextureFlipping() );
}
800.PixelShader_piece_ps.any: https://github.com/OGRECave/ogre-next/b ... ece_ps.any
Code: Select all
@property( two_sided_lighting )
@property( hlms_forwardplus_flipY )
@piece( two_sided_flip_normal )* (gl_FrontFacing ? -1.0 : 1.0)@end
@else
@piece( two_sided_flip_normal )* (gl_FrontFacing ? 1.0 : -1.0)@end
@end
@end