110 lines
2.1 KiB
HLSL
110 lines
2.1 KiB
HLSL
/*
|
|
menbprepassinternals.fx : MariENB prepass internal variables.
|
|
(C)2013-2017 Marisa Kirisame, UnSX Team.
|
|
Part of MariENB, the personal ENB of Marisa.
|
|
Released under the GNU GPLv3 (or later).
|
|
*/
|
|
/* mathematical constants */
|
|
static const float pi = 3.1415926535898;
|
|
/* edge detect factors */
|
|
static const float3x3 GX =
|
|
{
|
|
-1, 0, 1,
|
|
-2, 0, 2,
|
|
-1, 0, 1
|
|
};
|
|
static const float3x3 GY =
|
|
{
|
|
1, 2, 1,
|
|
0, 0, 0,
|
|
-1,-2,-1
|
|
};
|
|
/* radius: 8, std dev: 3 */
|
|
static const float gauss8[8] =
|
|
{
|
|
0.134598, 0.127325, 0.107778, 0.081638,
|
|
0.055335, 0.033562, 0.018216, 0.008847
|
|
};
|
|
/* standard stuff */
|
|
float4 ScreenSize;
|
|
float ENightDayFactor;
|
|
float EInteriorFactor;
|
|
float4 Timer;
|
|
float FieldOfView;
|
|
float4 WeatherAndTime;
|
|
/* this still doesn't do anything */
|
|
extern float fWaterLevel;
|
|
/* samplers and textures */
|
|
texture2D texColor;
|
|
texture2D texDepth;
|
|
texture2D texNoise3
|
|
<
|
|
string ResourceName = "menbnoise3.png";
|
|
>;
|
|
texture2D texHeat
|
|
<
|
|
#ifdef HEAT_DDS
|
|
string ResourceName = "menbheat.dds";
|
|
#else
|
|
string ResourceName = "menbheat.png";
|
|
#endif
|
|
>;
|
|
sampler2D SamplerColor = sampler_state
|
|
{
|
|
Texture = <texColor>;
|
|
MinFilter = LINEAR;
|
|
MagFilter = LINEAR;
|
|
MipFilter = NONE;
|
|
AddressU = Clamp;
|
|
AddressV = Clamp;
|
|
SRGBTexture = FALSE;
|
|
MaxMipLevel = 0;
|
|
MipMapLodBias = 0;
|
|
};
|
|
sampler2D SamplerDepth = sampler_state
|
|
{
|
|
Texture = <texDepth>;
|
|
MinFilter = LINEAR;
|
|
MagFilter = LINEAR;
|
|
MipFilter = NONE;
|
|
AddressU = Clamp;
|
|
AddressV = Clamp;
|
|
SRGBTexture = FALSE;
|
|
MaxMipLevel = 0;
|
|
MipMapLodBias = 0;
|
|
};
|
|
sampler2D SamplerNoise3 = sampler_state
|
|
{
|
|
Texture = <texNoise3>;
|
|
MinFilter = LINEAR;
|
|
MagFilter = LINEAR;
|
|
MipFilter = NONE;
|
|
AddressU = Wrap;
|
|
AddressV = Wrap;
|
|
SRGBTexture = FALSE;
|
|
MaxMipLevel = 0;
|
|
MipMapLodBias = 0;
|
|
};
|
|
sampler2D SamplerHeat = sampler_state
|
|
{
|
|
Texture = <texHeat>;
|
|
MinFilter = LINEAR;
|
|
MagFilter = LINEAR;
|
|
MipFilter = NONE;
|
|
AddressU = Wrap;
|
|
AddressV = Wrap;
|
|
SRGBTexture = FALSE;
|
|
MaxMipLevel = 0;
|
|
MipMapLodBias = 0;
|
|
};
|
|
/* whatever */
|
|
struct VS_OUTPUT_POST
|
|
{
|
|
float4 vpos : POSITION;
|
|
float2 txcoord : TEXCOORD0;
|
|
};
|
|
struct VS_INPUT_POST
|
|
{
|
|
float3 pos : POSITION;
|
|
float2 txcoord : TEXCOORD0;
|
|
};
|