Greetings @MajorPainTheCactus,
Looks like you did a serious overhaul of your code but some of the changes won’t work properly for OLED TVs.
Please see my notes and comments below. I tested this and almost pulled my hair out when I didn’t see the results I expected. A quick browse of the code revealed what was going on.
New
This does not work properly on OLED TV.
// 4K
// 300TVL
#define kMaxApertureGrilleSize 6
#define kRRGGBBX { kRed, kRed, kGreen, kGreen, kBlue, kBlue }
#define kRRBBGGX { kRed, kRed, kBlue, kBlue, kGreen, kGreen }
#define kBBGGRRX { kBlue, kBlue, kGreen, kGreen, kRed, kRed }
const uint kApertureGrilleMasks4K300TVL[kBGRAxis][kMaxApertureGrilleSize] =
{
kRRGGBBX, kRRBBGGX, kBBGGRRX
};
#undef kMaxApertureGrilleSize
#undef kRRGGBBX
#undef kRRBBGGX
#undef kBBGGRRX
//I didn’t test Slot Mask but this is the correct RRBBGGX layout for OLED TV below.
// 4K
// 300 TVL
#define kMaxSlotMaskSize 7
#define kMaxSlotSizeY 6
#define kXXXX { kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack }
#define kRRGGBBX { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack }
#define kRRBBGGX { kRed, kRed, kBlue, kBlue, kGreen, kGreen, kBlack }
#define kBBGGRRX { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack }
//This 8K, 600TVL RRBBGGX Mask you have here looks like the correct layout for a 4K, 300TVL OLED Mask to work properly.
// 8K
// 300 TVL
#define kMaxApertureGrilleSize 13
#define kRRRRGGGGBBBBX { kRed, kRed, kRed, kRed, kGreen, kGreen, kGreen, kGreen, kBlue, kBlue, kBlue, kBlue, kBlack }
#define kRRRRBBBBGGGGX { kRed, kRed, kRed, kRed, kBlue, kBlue, kBlue, kBlue, kGreen, kGreen, kGreen, kGreen, kBlack }
#define kBBBBGGGGRRRRX { kBlue, kBlue, kBlue, kBlue, kGreen, kGreen, kGreen, kGreen, kRed, kRed, kRed, kRed, kBlack }
const uint kApertureGrilleMasks8K300TVL[kBGRAxis][kMaxApertureGrilleSize] =
{
kRRRRGGGGBBBBX, kRRRRBBBBGGGGX, kBBBBGGGGRRRRX
};
#undef kMaxApertureGrilleSize
#undef kRRRRGGGGBBBBX
#undef kRRRRBBBBGGGGX
#undef kBBBBGGGGRRRRX
// 600 TVL
#define kMaxApertureGrilleSize 7
#define kRRGGBBX { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack }
#define kRRBBGGX { kRed, kRed, kBlue, kBlue, kGreen, kGreen, kBlack }
#define kBBGGRRX { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack }
const uint kApertureGrilleMasks8K600TVL[kBGRAxis][kMaxApertureGrilleSize] =
{
kRRGGBBX, kRRBBGGX, kBBGGRRX
};
#undef kMaxApertureGrilleSize
#undef kRRGGBBX
#undef kRRBBGGX
#undef kBBGGRRX
Old, modified by me.
This works properly on OLED TV
// APERTURE GRILLE MASKS
#define kMaxApertureGrilleSize 7
#define kMG { kMagenta, kGreen, kBlack, kBlack, kBlack, kBlack, kBlack }
#define kGM { kGreen, kMagenta, kBlack, kBlack, kBlack, kBlack, kBlack }
#define kBGR { kBlue, kGreen, kRed, kBlack, kBlack, kBlack, kBlack }
#define kRGB { kRed, kGreen, kBlue, kBlack, kBlack, kBlack, kBlack }
#define kRGBX { kRed, kGreen, kBlue, kBlack, kBlack, kBlack, kBlack }
#define kBGRX { kBlue, kGreen, kRed, kBlack, kBlack, kBlack, kBlack }
#define kRYCBX { kRed, kYellow, kCyan, kBlue, kBlack, kBlack, kBlack }
#define kBCYRX { kBlue, kCyan, kYellow, kRed, kBlack, kBlack, kBlack }
#define kRRGGBBX { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack }
#define kRRBBGGX { kRed, kRed, kBlue, kBlue, kGreen, kGreen, kBlack }
const float kApertureGrilleMaskSize[kResolutionAxis][kTVLAxis] = { { 7.0f, 4.0f, 3.0f, 2.0f }, { 7.0f, 7.0f, 5.0f, 4.0f } }; //4K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL 8K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL
const uint kApertureGrilleMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxApertureGrilleSize] = {
{ // 4K
{ kRRGGBBX, kRRBBGGX }, // 300 TVL
{ kRGBX, kBGRX }, // 600 TVL
{ kBGR, kRGB }, // 800 TVL
{ kMG, kGM } // 1000 TVL
},
{ // 8K
{ kRRGGBBX, kRRBBGGX }, // 300 TVL
{ kRRGGBBX, kRRBBGGX }, // 600 TVL
{ kRYCBX, kRYCBX }, // 800 TVL
{ kRGBX, kBGRX } // 1000 TVL
}
};
#undef kXXXX
#undef kMG
#undef kGM
#undef kBGR
#undef kRGB
#undef kRGBX
#undef kBGRX
#undef kRYCBX
#undef kBCYRX
#undef kRRGGBBX
#undef kRRBBGGX
Thanks for this great shader! Even with the anomalies the overall output looked really impressive in HDR mode! Most likely due to what I mentioned above the RGB and BGR modes looked better than the new OLED mode in terms of overall colour, not at the “phosphor” triad level though.