v0.14.6.0
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
// vim:ft=hlsl
|
||||
//float4 baseColor;
|
||||
float seed;
|
||||
float intensity;
|
||||
float4 grainColor;
|
||||
|
||||
float nrand(float2 uv)
|
||||
{
|
||||
@@ -9,16 +10,15 @@ float nrand(float2 uv)
|
||||
|
||||
float4 grain(float4 position : SV_POSITION, float4 clr : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float4 baseColor = { 1, 1, 1, 0.25 };
|
||||
float4 baseColor = grainColor;
|
||||
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;
|
||||
color.a = alpha * intensity;
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
technique Grain
|
||||
{
|
||||
pass Pass1
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// vim:ft=hlsl
|
||||
//float4 baseColor;
|
||||
float seed;
|
||||
float intensity;
|
||||
float4 grainColor;
|
||||
|
||||
float nrand(float2 uv)
|
||||
{
|
||||
@@ -9,16 +10,15 @@ float nrand(float2 uv)
|
||||
|
||||
float4 grain(float4 position : SV_POSITION, float4 clr : COLOR0, float2 texCoord : TEXCOORD0) : COLOR0
|
||||
{
|
||||
float4 baseColor = { 1, 1, 1, 0.25 };
|
||||
float4 baseColor = grainColor;
|
||||
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;
|
||||
color.a = alpha * intensity;
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
technique Grain
|
||||
{
|
||||
pass Pass1
|
||||
|
||||
Reference in New Issue
Block a user