mirror of
https://github.com/italicsjenga/slang-shaders.git
synced 2024-11-23 00:01:31 +11:00
Merge pull request #201 from bacondither/fsr-update1
Update FSR and add EASU upscaling only preset
This commit is contained in:
commit
ad7d2f32a0
7
fsr/fsr-easu.slangp
Normal file
7
fsr/fsr-easu.slangp
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
shaders = 1
|
||||||
|
|
||||||
|
shader0 = shaders/fsr-pass0.slang
|
||||||
|
filter_linear0 = true
|
||||||
|
scale_type0 = viewport
|
||||||
|
scale0 = 1.0
|
||||||
|
wrap_mode0 = clamp_to_edge
|
|
@ -4,11 +4,13 @@ shader0 = shaders/fsr-pass0.slang
|
||||||
filter_linear0 = true
|
filter_linear0 = true
|
||||||
scale_type0 = viewport
|
scale_type0 = viewport
|
||||||
scale0 = 1.0
|
scale0 = 1.0
|
||||||
|
wrap_mode0 = clamp_to_edge
|
||||||
|
|
||||||
shader1 = shaders/fsr-pass1.slang
|
shader1 = shaders/fsr-pass1.slang
|
||||||
filter_linear1 = true
|
filter_linear1 = true
|
||||||
scale_type1 = source
|
scale_type1 = source
|
||||||
scale1 = 1.0
|
scale1 = 1.0
|
||||||
|
wrap_mode1 = clamp_to_edge
|
||||||
|
|
||||||
parameters = "FSR_SHARPENING;FSR_FILMGRAIN;FSR_GRAINCOLOR;FSR_GRAINPDF"
|
parameters = "FSR_SHARPENING;FSR_FILMGRAIN;FSR_GRAINCOLOR;FSR_GRAINPDF"
|
||||||
FSR_SHARPENING = 0.3
|
FSR_SHARPENING = 0.3
|
||||||
|
|
|
@ -747,12 +747,12 @@ AF1 sharpness){
|
||||||
// Immediate constants for peak range.
|
// Immediate constants for peak range.
|
||||||
AF2 peakC=AF2(1.0,-1.0*4.0);
|
AF2 peakC=AF2(1.0,-1.0*4.0);
|
||||||
// Limiters, these need to be high precision RCPs.
|
// Limiters, these need to be high precision RCPs.
|
||||||
AF1 hitMinR=mn4R*ARcpF1(AF1_(4.0)*mx4R);
|
AF1 hitMinR=min(mn4R,eR)*ARcpF1(AF1_(4.0)*mx4R);
|
||||||
AF1 hitMinG=mn4G*ARcpF1(AF1_(4.0)*mx4G);
|
AF1 hitMinG=min(mn4G,eG)*ARcpF1(AF1_(4.0)*mx4G);
|
||||||
AF1 hitMinB=mn4B*ARcpF1(AF1_(4.0)*mx4B);
|
AF1 hitMinB=min(mn4B,eB)*ARcpF1(AF1_(4.0)*mx4B);
|
||||||
AF1 hitMaxR=(peakC.x-mx4R)*ARcpF1(AF1_(4.0)*mn4R+peakC.y);
|
AF1 hitMaxR=(peakC.x-max(mx4R,eR))*ARcpF1(AF1_(4.0)*mn4R+peakC.y);
|
||||||
AF1 hitMaxG=(peakC.x-mx4G)*ARcpF1(AF1_(4.0)*mn4G+peakC.y);
|
AF1 hitMaxG=(peakC.x-max(mx4G,eG))*ARcpF1(AF1_(4.0)*mn4G+peakC.y);
|
||||||
AF1 hitMaxB=(peakC.x-mx4B)*ARcpF1(AF1_(4.0)*mn4B+peakC.y);
|
AF1 hitMaxB=(peakC.x-max(mx4B,eB))*ARcpF1(AF1_(4.0)*mn4B+peakC.y);
|
||||||
AF1 lobeR=max(-hitMinR,hitMaxR);
|
AF1 lobeR=max(-hitMinR,hitMaxR);
|
||||||
AF1 lobeG=max(-hitMinG,hitMaxG);
|
AF1 lobeG=max(-hitMinG,hitMaxG);
|
||||||
AF1 lobeB=max(-hitMinB,hitMaxB);
|
AF1 lobeB=max(-hitMinB,hitMaxB);
|
||||||
|
@ -845,12 +845,12 @@ AF1 sharpness){
|
||||||
// Immediate constants for peak range.
|
// Immediate constants for peak range.
|
||||||
AH2 peakC=AH2(1.0,-1.0*4.0);
|
AH2 peakC=AH2(1.0,-1.0*4.0);
|
||||||
// Limiters, these need to be high precision RCPs.
|
// Limiters, these need to be high precision RCPs.
|
||||||
AH1 hitMinR=mn4R*ARcpH1(AH1_(4.0)*mx4R);
|
AH1 hitMinR=min(mn4R,eR)*ARcpH1(AH1_(4.0)*mx4R);
|
||||||
AH1 hitMinG=mn4G*ARcpH1(AH1_(4.0)*mx4G);
|
AH1 hitMinG=min(mn4G,eG)*ARcpH1(AH1_(4.0)*mx4G);
|
||||||
AH1 hitMinB=mn4B*ARcpH1(AH1_(4.0)*mx4B);
|
AH1 hitMinB=min(mn4B,eB)*ARcpH1(AH1_(4.0)*mx4B);
|
||||||
AH1 hitMaxR=(peakC.x-mx4R)*ARcpH1(AH1_(4.0)*mn4R+peakC.y);
|
AH1 hitMaxR=(peakC.x-max(mx4R,eR))*ARcpH1(AH1_(4.0)*mn4R+peakC.y);
|
||||||
AH1 hitMaxG=(peakC.x-mx4G)*ARcpH1(AH1_(4.0)*mn4G+peakC.y);
|
AH1 hitMaxG=(peakC.x-max(mx4G,eG))*ARcpH1(AH1_(4.0)*mn4G+peakC.y);
|
||||||
AH1 hitMaxB=(peakC.x-mx4B)*ARcpH1(AH1_(4.0)*mn4B+peakC.y);
|
AH1 hitMaxB=(peakC.x-max(mx4B,eB))*ARcpH1(AH1_(4.0)*mn4B+peakC.y);
|
||||||
AH1 lobeR=max(-hitMinR,hitMaxR);
|
AH1 lobeR=max(-hitMinR,hitMaxR);
|
||||||
AH1 lobeG=max(-hitMinG,hitMaxG);
|
AH1 lobeG=max(-hitMinG,hitMaxG);
|
||||||
AH1 lobeB=max(-hitMinB,hitMaxB);
|
AH1 lobeB=max(-hitMinB,hitMaxB);
|
||||||
|
@ -963,12 +963,12 @@ AF1 sharpness){
|
||||||
// Immediate constants for peak range.
|
// Immediate constants for peak range.
|
||||||
AH2 peakC=AH2(1.0,-1.0*4.0);
|
AH2 peakC=AH2(1.0,-1.0*4.0);
|
||||||
// Limiters, these need to be high precision RCPs.
|
// Limiters, these need to be high precision RCPs.
|
||||||
AH2 hitMinR=mn4R*ARcpH2(AH2_(4.0)*mx4R);
|
AH2 hitMinR=min(mn4R,eR)*ARcpH2(AH2_(4.0)*mx4R);
|
||||||
AH2 hitMinG=mn4G*ARcpH2(AH2_(4.0)*mx4G);
|
AH2 hitMinG=min(mn4G,eG)*ARcpH2(AH2_(4.0)*mx4G);
|
||||||
AH2 hitMinB=mn4B*ARcpH2(AH2_(4.0)*mx4B);
|
AH2 hitMinB=min(mn4B,eB)*ARcpH2(AH2_(4.0)*mx4B);
|
||||||
AH2 hitMaxR=(peakC.x-mx4R)*ARcpH2(AH2_(4.0)*mn4R+peakC.y);
|
AH2 hitMaxR=(peakC.x-max(mx4R,eR))*ARcpH2(AH2_(4.0)*mn4R+peakC.y);
|
||||||
AH2 hitMaxG=(peakC.x-mx4G)*ARcpH2(AH2_(4.0)*mn4G+peakC.y);
|
AH2 hitMaxG=(peakC.x-max(mx4G,eG))*ARcpH2(AH2_(4.0)*mn4G+peakC.y);
|
||||||
AH2 hitMaxB=(peakC.x-mx4B)*ARcpH2(AH2_(4.0)*mn4B+peakC.y);
|
AH2 hitMaxB=(peakC.x-max(mx4B,eB))*ARcpH2(AH2_(4.0)*mn4B+peakC.y);
|
||||||
AH2 lobeR=max(-hitMinR,hitMaxR);
|
AH2 lobeR=max(-hitMinR,hitMaxR);
|
||||||
AH2 lobeG=max(-hitMinG,hitMaxG);
|
AH2 lobeG=max(-hitMinG,hitMaxG);
|
||||||
AH2 lobeB=max(-hitMinB,hitMaxB);
|
AH2 lobeB=max(-hitMinB,hitMaxB);
|
||||||
|
|
|
@ -29,11 +29,13 @@ shader4 = shaders/fsr-pass0.slang
|
||||||
filter_linear4 = true
|
filter_linear4 = true
|
||||||
scale_type4 = viewport
|
scale_type4 = viewport
|
||||||
scale4 = 1.0
|
scale4 = 1.0
|
||||||
|
wrap_mode4 = clamp_to_edge
|
||||||
|
|
||||||
shader5 = shaders/fsr-pass1.slang
|
shader5 = shaders/fsr-pass1.slang
|
||||||
filter_linear5 = true
|
filter_linear5 = true
|
||||||
scale_type5 = source
|
scale_type5 = source
|
||||||
scale5 = 1.0
|
scale5 = 1.0
|
||||||
|
wrap_mode5 = clamp_to_edge
|
||||||
|
|
||||||
parameters = "SMAA_EDT;SMAA_THRESHOLD;SMAA_MAX_SEARCH_STEPS;SMAA_MAX_SEARCH_STEPS_DIAG;SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR;SMAA_CORNER_ROUNDING;FSR_SHARPENING;FSR_FILMGRAIN;FSR_GRAINCOLOR;FSR_GRAINPDF"
|
parameters = "SMAA_EDT;SMAA_THRESHOLD;SMAA_MAX_SEARCH_STEPS;SMAA_MAX_SEARCH_STEPS_DIAG;SMAA_LOCAL_CONTRAST_ADAPTATION_FACTOR;SMAA_CORNER_ROUNDING;FSR_SHARPENING;FSR_FILMGRAIN;FSR_GRAINCOLOR;FSR_GRAINPDF"
|
||||||
SMAA_EDT = 1.0
|
SMAA_EDT = 1.0
|
||||||
|
|
Loading…
Reference in a new issue