Unstable 0.1300.1.11

This commit is contained in:
Markus Isberg
2021-04-26 21:07:23 +03:00
parent 841d755394
commit 2c750282ec
76 changed files with 671 additions and 396 deletions
@@ -61,3 +61,9 @@
/processorParam:DebugMode=Auto
/build:watershader.fx
#begin grainshader.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:grainshader.fx
@@ -61,3 +61,9 @@
/processorParam:DebugMode=Auto
/build:watershader_opengl.fx
#begin grainshader_opengl.fx
/importer:EffectImporter
/processor:EffectProcessor
/processorParam:DebugMode=Auto
/build:grainshader_opengl.fx
@@ -0,0 +1,28 @@
// vim:ft=hlsl
//float4 baseColor;
float seed;
float nrand(float2 uv)
{
return frac(sin(dot(uv, float2(12.9898, 78.233) * seed)) * 43758.5453);
}
float4 grain(float4 position : SV_POSITION, float4 clr : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 baseColor = { 1, 1, 1, 0.25 };
float4 color = baseColor * nrand(texCoord);
float2 center = { 0.5, 0.5 };
float2 diff = texCoord - center;
float alpha = diff.x * diff.x + diff.y * diff.y;
color.a = alpha;
return clr * color;
}
technique Grain
{
pass Pass1
{
PixelShader = compile ps_4_0_level_9_1 grain();
}
}
@@ -0,0 +1,28 @@
// vim:ft=hlsl
//float4 baseColor;
float seed;
float nrand(float2 uv)
{
return frac(sin(dot(uv, float2(12.9898, 78.233) * seed)) * 43758.5453);
}
float4 grain(float4 position : SV_POSITION, float4 clr : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
{
float4 baseColor = { 1, 1, 1, 0.25 };
float4 color = baseColor * nrand(texCoord);
float2 center = { 0.5, 0.5 };
float2 diff = texCoord - center;
float alpha = diff.x * diff.x + diff.y * diff.y;
color.a = alpha;
return clr * color;
}
technique Grain
{
pass Pass1
{
PixelShader = compile ps_3_0 grain();
}
}
@@ -26,6 +26,8 @@ sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; }
Texture2D xLosTexture;
sampler LosSampler = sampler_state { Texture = <xLosTexture>; };
float xLosAlpha;
float4 xColor;
float4 mainPS(VertexShaderOutput input) : COLOR0
@@ -39,7 +41,7 @@ float4 mainPS(VertexShaderOutput input) : COLOR0
sampleColor.r * xColor.r,
sampleColor.g * xColor.g,
sampleColor.b * xColor.b,
obscureAmount);
obscureAmount * xLosAlpha);
return outColor;
}
@@ -26,6 +26,8 @@ sampler TextureSampler : register (s0) = sampler_state { Texture = <xTexture>; }
Texture xLosTexture;
sampler LosSampler = sampler_state { Texture = <xLosTexture>; };
float xLosAlpha;
float4 xColor;
float4 mainPS(VertexShaderOutput input) : COLOR0
@@ -39,7 +41,7 @@ float4 mainPS(VertexShaderOutput input) : COLOR0
sampleColor.r * xColor.r,
sampleColor.g * xColor.g,
sampleColor.b * xColor.b,
obscureAmount);
obscureAmount * xLosAlpha);
return outColor;
}