Skip to content

Commit

Permalink
Merge pull request xbmc#18977 from thexai/shaders-fix
Browse files Browse the repository at this point in the history
Shaders: require profile level 9.3 only when is needed (ACES, Hable or HLG to PQ)
  • Loading branch information
enen92 committed Dec 26, 2020
2 parents cb35b21 + 66d50a7 commit a11f67a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion system/shaders/output_d3d.fx
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ float4 output(float3 color, float2 uv)

#if defined(KODI_OUTPUT_T)
#include "convolution_d3d.fx"

#if (defined(KODI_TONE_MAPPING_ACES) || defined(KODI_TONE_MAPPING_HABLE) || defined(KODI_HLG_TO_PQ))
#define PS_PROFILE ps_4_0_level_9_3
#else
#define PS_PROFILE ps_4_0_level_9_1
#endif

float3 m_params; // 0 - range (0 - full, 1 - limited), 1 - contrast, 2 - brightness

float4 OUTPUT_PS(VS_OUTPUT In) : SV_TARGET
Expand All @@ -189,7 +196,7 @@ technique11 OUTPUT_T
pass P0
{
SetVertexShader( VS_SHADER );
SetPixelShader( CompileShader( ps_4_0_level_9_3, OUTPUT_PS() ) );
SetPixelShader( CompileShader( PS_PROFILE, OUTPUT_PS() ) );
}
};
#endif

0 comments on commit a11f67a

Please sign in to comment.