Merge pull request #240 from MajorPainTheCactus/megatron_1_2

V1.4 Sony Megatron Shader
This commit is contained in:
hizzlekizzle 2022-03-17 21:28:22 -05:00 committed by GitHub
commit 0ee6d747c8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 70 additions and 14 deletions

View file

@ -0,0 +1,25 @@
#reference "crt-arcade-4k-hdr.slangp"
hcrt_paper_white_nits = "200.000000"
hcrt_expand_gamut = "1.000000"
hcrt_red_vertical_convergence = "0.200000"
hcrt_green_vertical_convergence = "0.200000"
hcrt_blue_vertical_convergence = "-0.230000"
hcrt_red_horizontal_convergence = "0.460000"
hcrt_green_horizontal_convergence = "-0.340000"
hcrt_blue_horizontal_convergence = "-0.340000"
hcrt_red_scanline_min = "1.0000000"
hcrt_red_scanline_max = "2.000000"
hcrt_red_scanline_attack = "1.000000"
hcrt_green_scanline_min = "1.000000"
hcrt_green_scanline_max = "2.000000"
hcrt_green_scanline_attack = "1.000000"
hcrt_blue_scanline_min = "1.000000"
hcrt_blue_scanline_max = "2.000000"
hcrt_blue_scanline_attack = "1.000000"
hcrt_red_beam_sharpness = "0.500000"
hcrt_red_beam_attack = "0.2000000"
hcrt_green_beam_sharpness = "0.500000"
hcrt_green_beam_attack = "0.200000"
hcrt_blue_beam_sharpness = "0.500000"
hcrt_blue_beam_attack = "0.200000"

View file

@ -0,0 +1,28 @@
#reference "crt-sony-megatron-sony-pvm.slangp"
hcrt_crt_resolution = "0.000000"
hcrt_colour_system = "0.000000"
hcrt_white_temperature = "2800.000000"
hcrt_expand_gamut = "1.000000"
hcrt_brightness = "0.150000"
hcrt_contrast = "0.000000"
hcrt_saturation = "0.100000"
hcrt_gamma = "0.250000"
hcrt_red_vertical_convergence = "0.000000"
hcrt_green_vertical_convergence = "-0.150000"
hcrt_blue_vertical_convergence = "0.000000"
hcrt_red_scanline_min = "0.400000"
hcrt_red_scanline_max = "0.750000"
hcrt_red_scanline_attack = "0.350000"
hcrt_green_scanline_min = "0.400000"
hcrt_green_scanline_max = "1.000000"
hcrt_green_scanline_attack = "0.350000"
hcrt_blue_scanline_min = "0.400000"
hcrt_blue_scanline_max = "0.750000"
hcrt_blue_scanline_attack = "0.350000"
hcrt_red_beam_sharpness = "1.400000"
hcrt_red_beam_attack = "0.7200000"
hcrt_green_beam_sharpness = "1.400000"
hcrt_green_beam_attack = "0.800000"
hcrt_blue_beam_sharpness = "1.400000"
hcrt_blue_beam_attack = "0.450000"

View file

@ -164,7 +164,7 @@ const vec3 kColourMask[3] = { kRedChannel, kGreenChannel, kBlueChannel };
#define kSlotMask 2 #define kSlotMask 2
#define kBGRAxis 2 #define kBGRAxis 2
#define kTVLAxis 3 #define kTVLAxis 4
#define kResolutionAxis 2 #define kResolutionAxis 2
// APERTURE GRILLE MASKS // APERTURE GRILLE MASKS
@ -186,15 +186,17 @@ const vec3 kColourMask[3] = { kRedChannel, kGreenChannel, kBlueChannel };
#define kRRGGBBX { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack } #define kRRGGBBX { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack }
#define kBBGGRRX { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack } #define kBBGGRRX { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack }
const uint kApertureGrilleMaskSize[kResolutionAxis][kTVLAxis] = { { 4, 3, 2 }, { 7, 5, 4 } }; //4K: 600 TVL, 800 TVL, 1000 TVL 8K: 600 TVL, 800 TVL, 1000 TVL const uint kApertureGrilleMaskSize[kResolutionAxis][kTVLAxis] = { { 7, 4, 3, 2 }, { 7, 7, 5, 4 } }; //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] = { const uint kApertureGrilleMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxApertureGrilleSize] = {
{ // 4K { // 4K
{ kRRGGBBX, kBBGGRRX }, // 300 TVL
{ kRGBX, kBGRX }, // 600 TVL { kRGBX, kBGRX }, // 600 TVL
{ kBGR, kRGB }, // 800 TVL { kBGR, kRGB }, // 800 TVL
{ kMG, kGM } // 1000 TVL { kMG, kGM } // 1000 TVL
}, },
{ // 8K { // 8K
{ kRRGGBBX, kBBGGRRX }, // 300 TVL
{ kRRGGBBX, kBBGGRRX }, // 600 TVL { kRRGGBBX, kBBGGRRX }, // 600 TVL
{ kRYCBX, kRYCBX }, // 800 TVL { kRYCBX, kRYCBX }, // 800 TVL
{ kRGBX, kBGRX } // 1000 TVL { kRGBX, kBGRX } // 1000 TVL
@ -244,16 +246,20 @@ const uint kApertureGrilleMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxApertur
#define kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR { kGGRRRRBBBBGG, kGGRRRRBBBBGG, kGGRRRRBBBBGG, kGGRRRRBBBBGG, kBBBBGGGGRRRR, kBBBBGGGGRRRR, kBBBBGGGGRRRR, kBBBBGGGGRRRR } #define kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR { kGGRRRRBBBBGG, kGGRRRRBBBBGG, kGGRRRRBBBBGG, kGGRRRRBBBBGG, kBBBBGGGGRRRR, kBBBBGGGGRRRR, kBBBBGGGGRRRR, kBBBBGGGGRRRR }
#define kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB { kGGBBBBRRRRGG, kGGBBBBRRRRGG, kGGBBBBRRRRGG, kGGBBBBRRRRGG, kRRRRGGGGBBBB, kRRRRGGGGBBBB, kRRRRGGGGBBBB, kRRRRGGGGBBBB } #define kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB { kGGBBBBRRRRGG, kGGBBBBRRRRGG, kGGBBBBRRRRGG, kGGBBBBRRRRGG, kRRRRGGGGBBBB, kRRRRGGGGBBBB, kRRRRGGGGBBBB, kRRRRGGGGBBBB }
const uint kShadowMaskSizeX[kResolutionAxis][kTVLAxis] = { { 6, 2, 2 }, { 12, 6, 6 } }; const uint kShadowMaskSizeX[kResolutionAxis][kTVLAxis] = { { 12, 6, 2, 2 }, { 12, 12, 6, 6 } };
const uint kShadowMaskSizeY[kResolutionAxis][kTVLAxis] = { { 4, 2, 2 }, { 8, 4, 4 } }; const uint kShadowMaskSizeY[kResolutionAxis][kTVLAxis] = { { 8, 4, 2, 2 }, { 8, 8, 4, 4 } };
const uint kShadowMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxShadowMaskSizeY][kMaxShadowMaskSizeX] = { const uint kShadowMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxShadowMaskSizeY][kMaxShadowMaskSizeX] = {
{ // 4K { // 4K
{ kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR,
kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB }, // 300 TVL
{ kGRRBBG_GRRBBG_BBGGRR_BBGGRR, kGBBRRG_GBBRRG_RRGGBB_RRGGBB }, // 600 TVL { kGRRBBG_GRRBBG_BBGGRR_BBGGRR, kGBBRRG_GBBRRG_RRGGBB_RRGGBB }, // 600 TVL
{ kMG_GM, kGM_MG }, // 800 TVL { kMG_GM, kGM_MG }, // 800 TVL
{ kMG_GM, kGM_MG } // 1000 TVL { kMG_GM, kGM_MG } // 1000 TVL
}, },
{ // 8K { // 8K
{ kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR,
kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB }, // 300 TVL
{ kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR, { kGGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_GGRRRRBBBBGG_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR_BBBBGGGGRRRR,
kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB }, // 600 TVL kGGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_GGBBBBRRRRGG_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB_RRRRGGGGBBBB }, // 600 TVL
{ kGRRBBG_GRRBBG_BBGGRR_BBGGRR, kGBBRRG_GBBRRG_RRGGBB_RRGGBB }, // 800 TVL { kGRRBBG_GRRBBG_BBGGRR_BBGGRR, kGBBRRG_GBBRRG_RRGGBB_RRGGBB }, // 800 TVL
@ -311,15 +317,17 @@ const uint kShadowMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxShadowMaskSizeY
#define kRRGGBBXRRGGBBX_RRGGBBXXXXX_RRGGBBXRRGGBBX_XXXXRRGGBBX { { kRRGGBBX, kRRGGBBX }, { kRRGGBBX, kXXXX }, { kRRGGBBX, kRRGGBBX }, { kXXXX, kRRGGBBX } } #define kRRGGBBXRRGGBBX_RRGGBBXXXXX_RRGGBBXRRGGBBX_XXXXRRGGBBX { { kRRGGBBX, kRRGGBBX }, { kRRGGBBX, kXXXX }, { kRRGGBBX, kRRGGBBX }, { kXXXX, kRRGGBBX } }
#define kBBGGRRXBBGGRRX_BBGGRRXXXXX_BBGGRRXBBGGRRX_XXXXBBGGRRX { { kBBGGRRX, kBBGGRRX }, { kBBGGRRX, kXXXX }, { kBBGGRRX, kBBGGRRX }, { kXXXX, kBBGGRRX } } #define kBBGGRRXBBGGRRX_BBGGRRXXXXX_BBGGRRXBBGGRRX_XXXXBBGGRRX { { kBBGGRRX, kBBGGRRX }, { kBBGGRRX, kXXXX }, { kBBGGRRX, kBBGGRRX }, { kXXXX, kBBGGRRX } }
const uint kSlotMaskSize[kResolutionAxis][kTVLAxis] = { { 4, 3, 2 }, { 7, 5, 4 } }; //4K: 600 TVL, 800 TVL, 1000 TVL 8K: 600 TVL, 800 TVL, 1000 TVL const uint kSlotMaskSize[kResolutionAxis][kTVLAxis] = { { 7, 4, 3, 2 }, { 7, 7, 5, 4 } }; //4K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL 8K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL
const uint kSlotMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxSlotSizeY][kMaxSlotSizeX][kMaxSlotMaskSize] = { const uint kSlotMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxSlotSizeY][kMaxSlotSizeX][kMaxSlotMaskSize] = {
{ // 4K { // 4K
{ kRGBXRGBX_RGBXXXXX_RGBXRGBX_XXXXRGBX, kBGRXBGRX_BGRXXXXX_BGRXBGRX_XXXXBGRX }, // 600 TVL { kRRGGBBXRRGGBBX_RRGGBBXXXXX_RRGGBBXRRGGBBX_XXXXRRGGBBX, kBBGGRRXBBGGRRX_BBGGRRXXXXX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X_RGBXXXXX_RGBXRGBX_XXXXRGBX, kBGRXBGRX_BGRXXXXX_BGRXBGRX_XXXXBGRX } // 1000 TVL

View file

@ -7,11 +7,6 @@
#pragma parameter hcrt_support2 "MIN SPEC: DisplayHDR 600, 4K, RetroArch v1.10" 0.0 0.0 0.0001 0.0 #pragma parameter hcrt_support2 "MIN SPEC: DisplayHDR 600, 4K, RetroArch v1.10" 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_support3 "REC SPEC: DisplayHDR 1000, 4K+, RetroArch v1.10" 0.0 0.0 0.0001 0.0 #pragma parameter hcrt_support3 "REC SPEC: DisplayHDR 1000, 4K+, RetroArch v1.10" 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_space1 " " 0.0 0.0 0.0001 0.0 #pragma parameter hcrt_space1 " " 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_instructions0 "HDR: Enable HDR: On" 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_instructions1 "SCALING: Integer Scale: ON" 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_instructions2 "SCALING: Integer Overscale: ON" 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_instructions3 "SCALING: Apect Ratio: Core Provided" 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_space2 " " 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_user_settings "USER SETTINGS:" 0.0 0.0 0.0001 0.0 #pragma parameter hcrt_user_settings "USER SETTINGS:" 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_hdr " HDR | SDR" 0.0 0.0 1.0 1.0 #pragma parameter hcrt_hdr " HDR | SDR" 0.0 0.0 1.0 1.0
#pragma parameter hcrt_max_nits " HDR: Display's Peak Luminance" 700.0 0.0 10000.0 10.0 #pragma parameter hcrt_max_nits " HDR: Display's Peak Luminance" 700.0 0.0 10000.0 10.0
@ -29,7 +24,7 @@
#pragma parameter hcrt_space3 " " 0.0 0.0 0.0001 0.0 #pragma parameter hcrt_space3 " " 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_developer_settings "DEVELOPER SETTINGS:" 0.0 0.0 0.0001 0.0 #pragma parameter hcrt_developer_settings "DEVELOPER SETTINGS:" 0.0 0.0 0.0001 0.0
#pragma parameter hcrt_crt_screen_type " CRT Type: APERTURE GRILLE | SHADOW MASK | SLOT MASK" 0.0 0.0 2.0 1.0 #pragma parameter hcrt_crt_screen_type " CRT Type: APERTURE GRILLE | SHADOW MASK | SLOT MASK" 0.0 0.0 2.0 1.0
#pragma parameter hcrt_crt_resolution " CRT Resolution: 600TVL | 800TVL | 1000TVL" 0.0 0.0 2.0 1.0 #pragma parameter hcrt_crt_resolution " CRT Resolution: 300TVL | 600TVL | 800TVL | 1000TVL" 1.0 0.0 3.0 1.0
#pragma parameter hcrt_colour_system " CRT Colour System: PAL | NTSC-U | NTSC-J" 1.0 0.0 2.0 1.0 #pragma parameter hcrt_colour_system " CRT Colour System: PAL | NTSC-U | NTSC-J" 1.0 0.0 2.0 1.0
#pragma parameter hcrt_white_temperature " White Point: (PAL:D65, NTSC-U:D65, NTSC-J:D93)" 0.0 -5000.0 12000.0 100.0 #pragma parameter hcrt_white_temperature " White Point: (PAL:D65, NTSC-U:D65, NTSC-J:D93)" 0.0 -5000.0 12000.0 100.0
#pragma parameter hcrt_expand_gamut " HDR: Original/Vivid" 0.0 0.0 1.0 1.0 #pragma parameter hcrt_expand_gamut " HDR: Original/Vivid" 0.0 0.0 1.0 1.0