AmbientLightDither2017 vs AmbientLightDither2020

建立於 差異永不過期
35 刪除
540 行
40 新增
525 行
/**
/**
* Copyright (C) 2015 Ganossa (mediehawk@gmail.com)
* Copyright (C) 2015 Ganossa (mediehawk@gmail.com)
*
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* this software and associated documentation files (the "Software"), to deal in
* the Software with restriction, including without limitation the rights to
* the Software with restriction, including without limitation the rights to
* use and/or sell copies of the Software, and to permit persons to whom the Software
* use and/or sell copies of the Software, and to permit persons to whom the Software
* is furnished to do so, subject to the following conditions:
* is furnished to do so, subject to the following conditions:
*
*
* The above copyright notice and the permission notices (this and below) shall
* The above copyright notice and the permission notices (this and below) shall
* be included in all copies or substantial portions of the Software.
* be included in all copies or substantial portions of the Software.
*
*
* Permission needs to be specifically granted by the author of the software to any
* Permission needs to be specifically granted by the author of the software to any
* person obtaining a copy of this software and associated documentation files
* person obtaining a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction, including without
* (the "Software"), to deal in the Software without restriction, including without
* limitation the rights to copy, modify, merge, publish, distribute, and/or
* limitation the rights to copy, modify, merge, publish, distribute, and/or
* sublicense the Software, and subject to the following conditions:
* sublicense the Software, and subject to the following conditions:
*
*
* The above copyright notice and the permission notices (this and above) shall
* The above copyright notice and the permission notices (this and above) shall
* be included in all copies or substantial portions of the Software.
* be included in all copies or substantial portions of the Software.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
* SOFTWARE.
*/
*/


/**
/**
* This version of AmbientLight.fx has been modified to allow the "dither" effect
* This version of AmbientLight.fx has been modified to allow the "dither" effect
* to be toggled on and off.
* to be toggled on and off.
*/
*/
#include "ReShadeUI.fxh"


uniform bool alDebug <
uniform bool alDebug <
ui_tooltip = "Activates debug mode of AL, upper bar shows detected light, lower bar shows adaptation";
ui_tooltip = "Activates debug mode of AL, upper bar shows detected light, lower bar shows adaptation";
> = false;
> = false;
uniform float alInt <
uniform float alInt < __UNIFORM_SLIDER_FLOAT1
ui_type = "drag";
ui_min = 0.0; ui_max = 20.0;
ui_min = 0.0; ui_max = 20.0;
ui_tooltip = "Base intensity of AL";
ui_tooltip = "Base intensity of AL";
> = 10.15;
> = 10.15;
uniform float alThreshold <
uniform float alThreshold < __UNIFORM_SLIDER_FLOAT1
ui_type = "drag";
ui_min = 0.0; ui_max = 100.0;
ui_min = 0.0; ui_max = 100.0;
ui_tooltip = "Reduces intensity for not bright light";
ui_tooltip = "Reduces intensity for not bright light";
> = 15.00;
> = 15.00;
uniform bool AL_Dither <
uniform bool AL_Dither <
ui_tooltip = "Applies dither - may cause diagonal stripes";
ui_tooltip = "Applies dither - may cause diagonal stripes";
> = true;
> = true;


uniform bool AL_Adaptation <
uniform bool AL_Adaptation <
ui_tooltip = "Activates adaptation algorithm";
ui_tooltip = "Activates adaptation algorithm";
> = true;
> = true;
uniform float alAdapt <
uniform float alAdapt < __UNIFORM_SLIDER_FLOAT1
ui_type = "drag";
ui_min = 0.0; ui_max = 4.0;
ui_min = 0.0; ui_max = 4.0;
ui_tooltip = "Intensity of AL correction for bright light";
ui_tooltip = "Intensity of AL correction for bright light";
> = 0.70;
> = 0.70;
uniform float alAdaptBaseMult <
uniform float alAdaptBaseMult < __UNIFORM_SLIDER_FLOAT1
ui_type = "drag";
ui_min = 0.0; ui_max = 4.0;
ui_min = 0.0; ui_max = 4.0;
ui_tooltip = "Multiplier for adaption applied to the original image";
ui_tooltip = "Multiplier for adaption applied to the original image";
> = 1.00;
> = 1.00;
uniform int alAdaptBaseBlackLvL <
uniform int alAdaptBaseBlackLvL < __UNIFORM_SLIDER_INT1
ui_type = "drag";
ui_min = 0; ui_max = 4;
ui_min = 0; ui_max = 4;
ui_tooltip = "Distinction level of black and white (lower => less distinct)";
ui_tooltip = "Distinction level of black and white (lower => less distinct)";
> = 2;
> = 2;


uniform bool AL_Dirt <
uniform bool AL_Dirt <
> = true;
> = true;
uniform bool AL_DirtTex <
uniform bool AL_DirtTex <
ui_tooltip = "Defines if dirt texture is used as overlay";
ui_tooltip = "Defines if dirt texture is used as overlay";
> = false;
> = false;
uniform bool AL_Vibrance <
uniform bool AL_Vibrance <
ui_tooltip = "Vibrance of dirt effect";
ui_tooltip = "Vibrance of dirt effect";
> = false;
> = false;
uniform int AL_Adaptive <
uniform int AL_Adaptive <
ui_type = "combo";
ui_type = "combo";
ui_min = 0; ui_max = 2;
ui_min = 0; ui_max = 2;
ui_items = "Warm\0Cold\0Light Dependent\0";
ui_items = "Warm\0Cold\0Light Dependent\0";
> = 0;
> = 0;
uniform float alDirtInt <
uniform float alDirtInt < __UNIFORM_SLIDER_FLOAT1
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Intensity of dirt effect";
ui_tooltip = "Intensity of dirt effect";
> = 1.0;
> = 1.0;
uniform float alDirtOVInt <
uniform float alDirtOVInt < __UNIFORM_SLIDER_FLOAT1
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Intensity of colored dirt effect";
ui_tooltip = "Intensity of colored dirt effect";
> = 1.0;
> = 1.0;
uniform bool AL_Lens <
uniform bool AL_Lens <
ui_tooltip = "Lens effect based on AL";
ui_tooltip = "Lens effect based on AL";
> = false;
> = false;
uniform float alLensThresh <
uniform float alLensThresh < __UNIFORM_SLIDER_FLOAT1
ui_type = "drag";
ui_min = 0.0; ui_max = 1.0;
ui_min = 0.0; ui_max = 1.0;
ui_tooltip = "Reduces intensity of lens effect for not bright light";
ui_tooltip = "Reduces intensity of lens effect for not bright light";
> = 0.5;
> = 0.5;
uniform float alLensInt <
uniform float alLensInt < __UNIFORM_SLIDER_FLOAT1
ui_type = "drag";
ui_min = 0.0; ui_max = 10.0;
ui_min = 0.0; ui_max = 10.0;
ui_tooltip = "Intensity of lens effect";
ui_tooltip = "Intensity of lens effect";
> = 2.0;
> = 2.0;