v0.13.0.11
This commit is contained in:
@@ -61,9 +61,3 @@
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:watershader.fx
|
||||
|
||||
#begin grainshader.fx
|
||||
/importer:EffectImporter
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:grainshader.fx
|
||||
|
||||
|
||||
@@ -61,9 +61,3 @@
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:watershader_opengl.fx
|
||||
|
||||
#begin grainshader_opengl.fx
|
||||
/importer:EffectImporter
|
||||
/processor:EffectProcessor
|
||||
/processorParam:DebugMode=Auto
|
||||
/build:grainshader_opengl.fx
|
||||
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
// 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();
|
||||
}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
// 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,8 +26,6 @@ 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
|
||||
@@ -41,7 +39,7 @@ float4 mainPS(VertexShaderOutput input) : COLOR0
|
||||
sampleColor.r * xColor.r,
|
||||
sampleColor.g * xColor.g,
|
||||
sampleColor.b * xColor.b,
|
||||
obscureAmount * xLosAlpha);
|
||||
obscureAmount);
|
||||
|
||||
return outColor;
|
||||
}
|
||||
|
||||
@@ -26,8 +26,6 @@ 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
|
||||
@@ -41,7 +39,7 @@ float4 mainPS(VertexShaderOutput input) : COLOR0
|
||||
sampleColor.r * xColor.r,
|
||||
sampleColor.g * xColor.g,
|
||||
sampleColor.b * xColor.b,
|
||||
obscureAmount * xLosAlpha);
|
||||
obscureAmount);
|
||||
|
||||
return outColor;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user