mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-22 15:51:30 +11:00
Added NTSC support to 'crappy tv' preset otherwise known as the AEG CTV-4800-VT
This commit is contained in:
parent
70637c26a4
commit
57df3c0c12
74
hdr/crt-sony-megatron-aeg-CTV-4800-VT-hdr.slangp
Normal file
74
hdr/crt-sony-megatron-aeg-CTV-4800-VT-hdr.slangp
Normal file
|
@ -0,0 +1,74 @@
|
|||
shaders = "5"
|
||||
feedback_pass = "0"
|
||||
|
||||
shader0 = "../ntsc/shaders/ntsc-adaptive/ntsc-pass1.slang"
|
||||
scale_type0 = source
|
||||
scale_x0 = 4.0
|
||||
filter_linear0 = false
|
||||
scale_y0 = 1.0
|
||||
float_framebuffer0 = true
|
||||
|
||||
shader1 = "../ntsc/shaders/ntsc-adaptive/ntsc-pass2.slang"
|
||||
scale_type1 = source
|
||||
scale_x1 = 0.75
|
||||
scale_y1 = 1.0
|
||||
filter_linear1 = true
|
||||
|
||||
shader2 = "shaders/crt-sony-megatron-source-pass.slang"
|
||||
filter_linear2 = "false"
|
||||
scale_type2 = "source"
|
||||
scale2 = "1.0"
|
||||
wrap_mode2 = "clamp_to_border"
|
||||
mipmap_input2 = "false"
|
||||
alias2 = "SourceSDR"
|
||||
|
||||
shader3 = "shaders/crt-sony-megatron-hdr-pass.slang"
|
||||
filter_linear3 = "false"
|
||||
scale_type3 = "source"
|
||||
scale3 = "1.0"
|
||||
wrap_mode3 = "clamp_to_border"
|
||||
mipmap_input3 = "false"
|
||||
alias3 = "SourceHDR"
|
||||
|
||||
shader4 = "shaders/crt-sony-megatron.slang"
|
||||
filter_linear4 = "false"
|
||||
wrap_mode4 = "clamp_to_border"
|
||||
mipmap_input4 = "false"
|
||||
alias4 = ""
|
||||
float_framebuffer4 = "false"
|
||||
srgb_framebuffer4 = "false"
|
||||
|
||||
hcrt_hdr = "1.000000"
|
||||
hcrt_crt_screen_type = "2.000000"
|
||||
hcrt_crt_resolution = "0.000000"
|
||||
hcrt_paper_white_nits = "700.000000"
|
||||
hcrt_expand_gamut = "0.000000"
|
||||
hcrt_white_temperature = "0.000000"
|
||||
hcrt_gamma = "0.000000"
|
||||
|
||||
hcrt_red_vertical_convergence = "0.000000"
|
||||
hcrt_green_vertical_convergence = "0.000000"
|
||||
hcrt_blue_vertical_convergence = "0.000000"
|
||||
hcrt_red_horizontal_convergence = "0.000000"
|
||||
hcrt_green_horizontal_convergence = "0.000000"
|
||||
hcrt_blue_horizontal_convergence = "-1.000000"
|
||||
|
||||
hcrt_red_scanline_min = "1.0000000"
|
||||
hcrt_red_scanline_max = "1.100000"
|
||||
hcrt_red_scanline_attack = "0.850000"
|
||||
hcrt_red_scanline_end = "0.000000"
|
||||
hcrt_green_scanline_min = "1.000000"
|
||||
hcrt_green_scanline_max = "1.100000"
|
||||
hcrt_green_scanline_attack = "0.850000"
|
||||
hcrt_green_scanline_end = "0.000000"
|
||||
hcrt_blue_scanline_min = "1.000000"
|
||||
hcrt_blue_scanline_max = "1.100000"
|
||||
hcrt_blue_scanline_attack = "0.850000"
|
||||
hcrt_blue_scanline_end = "0.000000"
|
||||
|
||||
hcrt_red_beam_sharpness = "1.000000"
|
||||
hcrt_red_beam_attack = "0.0000000"
|
||||
hcrt_green_beam_sharpness = "1.000000"
|
||||
hcrt_green_beam_attack = "0.000000"
|
||||
hcrt_blue_beam_sharpness = "1.000000"
|
||||
hcrt_blue_beam_attack = "0.000000"
|
|
@ -286,7 +286,7 @@ const uint kShadowMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxShadowMaskSizeY
|
|||
|
||||
#define kMaxSlotMaskSize 8
|
||||
#define kMaxSlotSizeX 2
|
||||
#define kMaxSlotSizeY 4
|
||||
#define kMaxSlotSizeY 6
|
||||
|
||||
#define kXXXX { kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack, kBlack }
|
||||
|
||||
|
@ -305,33 +305,34 @@ const uint kShadowMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxShadowMaskSizeY
|
|||
#define kRRGGBBX { kRed, kRed, kGreen, kGreen, kBlue, kBlue, kBlack, kBlack }
|
||||
#define kBBGGRRX { kBlue, kBlue, kGreen, kGreen, kRed, kRed, kBlack, kBlack }
|
||||
|
||||
#define kMGMG_MGXX_MGMG_XXMG { { kMG, kMG }, { kMG, kXXXX }, { kMG, kMG }, { kXXXX, kMG } }
|
||||
#define kGMGM_GMXX_GMGM_XXGM { { kGM, kGM }, { kGM, kXXXX }, { kGM, kGM }, { kXXXX, kGM } }
|
||||
#define kMGMG_MGXX_MGMG_XXMG { { kMG, kMG }, { kMG, kXXXX }, { kMG, kMG }, { kXXXX, kMG }, { kXXXX, kXXXX }, { kXXXX, kXXXX } }
|
||||
#define kGMGM_GMXX_GMGM_XXGM { { kGM, kGM }, { kGM, kXXXX }, { kGM, kGM }, { kXXXX, kGM }, { kXXXX, kXXXX }, { kXXXX, kXXXX } }
|
||||
|
||||
#define kBGRBGR_BGRXXX_BGRBGR_XXXBGR { { kBGR, kBGR }, { kBGR, kXXXX }, { kBGR, kBGR }, { kXXXX, kBGR } }
|
||||
#define kRGBRGB_RGBXXX_RGBRGB_XXXRGB { { kRGB, kRGB }, { kRGB, kXXXX }, { kRGB, kRGB }, { kXXXX, kRGB } }
|
||||
#define kBGRBGR_BGRXXX_BGRBGR_XXXBGR { { kBGR, kBGR }, { kBGR, kXXXX }, { kBGR, kBGR }, { kXXXX, kBGR }, { kXXXX, kXXXX }, { kXXXX, kXXXX } }
|
||||
#define kRGBRGB_RGBXXX_RGBRGB_XXXRGB { { kRGB, kRGB }, { kRGB, kXXXX }, { kRGB, kRGB }, { kXXXX, kRGB }, { kXXXX, kXXXX }, { kXXXX, kXXXX } }
|
||||
|
||||
#define kRGBXRGBX_RGBXXXXX_RGBXRGBX_XXXXRGBX { { kRGBX, kRGBX }, { kRGBX, kXXXX }, { kRGBX, kRGBX }, { kXXXX, kRGBX } }
|
||||
#define kBGRXBGRX_BGRXXXXX_BGRXBGRX_XXXXBGRX { { kBGRX, kBGRX }, { kBGRX, kXXXX }, { kBGRX, kBGRX }, { kXXXX, kBGRX } }
|
||||
#define kRGBXRGBX_RGBXXXXX_RGBXRGBX_XXXXRGBX { { kRGBX, kRGBX }, { kRGBX, kXXXX }, { kRGBX, kRGBX }, { kXXXX, kRGBX }, { kXXXX, kXXXX }, { kXXXX, kXXXX } }
|
||||
#define kBGRXBGRX_BGRXXXXX_BGRXBGRX_XXXXBGRX { { kBGRX, kBGRX }, { kBGRX, kXXXX }, { kBGRX, kBGRX }, { kXXXX, kBGRX }, { kXXXX, kXXXX }, { kXXXX, kXXXX } }
|
||||
|
||||
#define kRYCBXRYCBX_RYCBXXXXX_RYCBXRYCBX_XXXXRYCBX { { kRYCBX, kRYCBX }, { kRYCBX, kXXXX }, { kRYCBX, kRYCBX }, { kXXXX, kRYCBX } }
|
||||
#define kBCYRXBCYRX_BCYRXXXXX_BCYRXBCYRX_XXXXBCYRX { { kBCYRX, kBCYRX }, { kBCYRX, kXXXX }, { kBCYRX, kBCYRX }, { kXXXX, kBCYRX } }
|
||||
#define kRYCBXRYCBX_RYCBXXXXX_RYCBXRYCBX_XXXXRYCBX { { kRYCBX, kRYCBX }, { kRYCBX, kXXXX }, { kRYCBX, kRYCBX }, { kXXXX, kRYCBX }, { kXXXX, kXXXX }, { kXXXX, kXXXX } }
|
||||
#define kBCYRXBCYRX_BCYRXXXXX_BCYRXBCYRX_XXXXBCYRX { { kBCYRX, kBCYRX }, { kBCYRX, kXXXX }, { kBCYRX, kBCYRX }, { kXXXX, kBCYRX }, { kXXXX, kXXXX }, { kXXXX, kXXXX } }
|
||||
|
||||
#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 kRRGGBBXRRGGBBX_RRGGBBXRRGGBBX_RRGGBBXXXXX_RRGGBBXRRGGBBX_RRGGBBXRRGGBBX_XXXXRRGGBBX { { kRRGGBBX, kRRGGBBX }, { kRRGGBBX, kRRGGBBX }, { kRRGGBBX, kXXXX }, { kRRGGBBX, kRRGGBBX }, { kRRGGBBX, kRRGGBBX }, { kXXXX, kRRGGBBX } }
|
||||
#define kBBGGRRXBBGGRRX_BBGGRRXBBGGRRX_BBGGRRXXXXX_BBGGRRXBBGGRRX_BBGGRRXBBGGRRX_XXXXBBGGRRX { { kBBGGRRX, kBBGGRRX }, { kBBGGRRX, kBBGGRRX }, { kBBGGRRX, kXXXX }, { kBBGGRRX, kBBGGRRX }, { kBBGGRRX, kBBGGRRX }, { kXXXX, kBBGGRRX } }
|
||||
|
||||
const float kSlotMaskSize[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 float kSlotMaskSizeX[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 float kSlotMaskSizeY[kResolutionAxis][kTVLAxis] = { { 6.0f, 4.0f, 4.0f, 4.0f }, { 6.0f, 6.0f, 4.0f, 4.0f } }; //4K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL 8K: 300 TVL, 600 TVL, 800 TVL, 1000 TVL
|
||||
|
||||
const uint kSlotMasks[kResolutionAxis][kTVLAxis][kBGRAxis][kMaxSlotSize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, // 300 TVL
|
||||
{ kRRGGBBXRRGGBBX_RRGGBBXRRGGBBX_RRGGBBXXXXX_RRGGBBXRRGGBBX_RRGGBBXRRGGBBX_XXXXRRGGBBX, kBBGGRRXBBGGRRX_BBGGRRXBBGGRRX_BBGGRRXXXXX_BBGGRRXBBGGRRX_BBGGRRXBBGGRRX_XXXXBBGGRRX }, // 600 TVL
|
||||
{ kRYCBXRYCBX_RYCBXXXXX_RYCBXRYCBX_XXXXRYCBX, kBCYRXBCYRX_BCYRXXXXX_BCYRXBCYRX_XXXXBCYRX }, // 800 TVL
|
||||
{ kRGBXRGBX_RGBXXXXX_RGBXRGBX_XXXXRGBX, kBGRXBGRX_BGRXXXXX_BGRXBGRX_XXXXBGRX } // 1000 TVL
|
||||
}
|
||||
|
@ -464,10 +465,10 @@ void main()
|
|||
}
|
||||
case kSlotMask:
|
||||
{
|
||||
uint slot_x = uint(floor(mod(current_position.x / kSlotMaskSize[lcd_resolution][crt_resolution], kMaxSlotSizeX)));
|
||||
uint slot_y = uint(floor(mod(current_position.y, kMaxSlotSizeY)));
|
||||
uint slot_x = uint(floor(mod(current_position.x / kSlotMaskSizeX[lcd_resolution][crt_resolution], kMaxSlotSizeX)));
|
||||
uint slot_y = uint(floor(mod(current_position.y, kSlotMaskSizeY[lcd_resolution][crt_resolution])));
|
||||
|
||||
uint mask = uint(floor(mod(current_position.x, kSlotMaskSize[lcd_resolution][crt_resolution])));
|
||||
uint mask = uint(floor(mod(current_position.x, kSlotMaskSizeX[lcd_resolution][crt_resolution])));
|
||||
|
||||
colour_mask = kSlotMasks[lcd_resolution][crt_resolution][lcd_subpixel_layout][slot_x][slot_y][mask];
|
||||
|
||||
|
|
Loading…
Reference in a new issue