MCPcopy Create free account
hub / github.com/Aleksoid1978/VideoRenderer / UpdateBitmapShader

Method UpdateBitmapShader

Source/DX11VideoProcessor.cpp:3006–3034  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3004}
3005
3006void CDX11VideoProcessor::UpdateBitmapShader()
3007{
3008 if (m_bHdrDisplayModeEnabled
3009 && (SourceIsHDR() || m_bVPUseRTXVideoHDR)) {
3010 UINT resid;
3011 float SDR_peak_lum;
3012 switch (m_iHdrOsdBrightness) {
3013 default:
3014 resid = IDF_PS_11_CONVERT_BITMAP_TO_PQ;
3015 SDR_peak_lum = 100;
3016 break;
3017 case 1:
3018 resid = IDF_PS_11_CONVERT_BITMAP_TO_PQ1;
3019 SDR_peak_lum = 50;
3020 break;
3021 case 2:
3022 resid = IDF_PS_11_CONVERT_BITMAP_TO_PQ2;
3023 SDR_peak_lum = 30;
3024 break;
3025 }
3026 m_pPS_BitmapToFrame.Release();
3027 EXECUTE_ASSERT(S_OK == CreatePShaderFromResource(&m_pPS_BitmapToFrame, resid));
3028 m_dwStatsTextColor = TransferPQ(D3DCOLOR_XRGB(255, 255, 255), SDR_peak_lum);
3029 }
3030 else {
3031 m_pPS_BitmapToFrame = m_pPS_Simple;
3032 m_dwStatsTextColor = D3DCOLOR_XRGB(255, 255, 255);
3033 }
3034}
3035
3036HRESULT CDX11VideoProcessor::D3D11VPPass(ID3D11Texture2D* pRenderTarget, const CRect& srcRect, const CRect& dstRect, const bool second)
3037{

Callers

nothing calls this directly

Calls 2

TransferPQFunction · 0.85
ReleaseMethod · 0.45

Tested by

no test coverage detected