mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 21:39:52 +00:00
OpenXR - HUD support improved
This commit is contained in:
parent
38fa30b42d
commit
0b089dd1e5
@ -385,12 +385,16 @@ void LinkedShader::UpdateUniforms(u32 vertType, const ShaderID &vsid, bool useBu
|
||||
|
||||
// Set HUD mode
|
||||
if (gstate_c.Use(GPU_USE_VIRTUAL_REALITY)) {
|
||||
bool postprocess = ((gstate_c.curTextureWidth % 480 == 0) && (gstate_c.curTextureHeight % 272 == 0)) || gstate_c.textureFullAlpha;
|
||||
bool postprocess = gstate.isClearModeColorMask() || gstate_c.textureFullAlpha ||
|
||||
//rendering framebuffer on screen
|
||||
(gstate_c.curTextureWidth % 480 == 0) && (gstate_c.curTextureHeight % 272 == 0) ||
|
||||
//rendering far plane
|
||||
(fabs(gstate.viewMatrix[9]) > 1000) || (fabs(gstate.viewMatrix[11]) > 1000);
|
||||
|
||||
bool hud = is2D && !flatScreen && !postprocess &&
|
||||
gstate.isAlphaBlendEnabled() && //2D content has to be blended
|
||||
!gstate.isLightingEnabled() && //2D content cannot be rendered with lights on
|
||||
!gstate.isFogEnabled() && //2D content cannot be rendered with fog on
|
||||
!gstate.isDepthWriteEnabled(); //TODO:this needs to be improved! (GTA-LC, Tekken 6, Sonic Rivals)
|
||||
!gstate.isFogEnabled(); //2D content cannot be rendered with fog on
|
||||
if (hud) {
|
||||
render_->SetUniformF1(&u_scaleX, g_Config.fHeadUpDidplayScale * 480.0f / 272.0f);
|
||||
render_->SetUniformF1(&u_scaleY, g_Config.fHeadUpDidplayScale);
|
||||
|
Loading…
Reference in New Issue
Block a user