Skip to content

Commit

Permalink
Added Sepia tone post processing effect.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinnegatamante committed Jul 25, 2020
1 parent 16f516d commit 445a91a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Data/DaedalusX64/Shaders/Sepia Tone_f.cg
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
float4 main(
float2 vTexcoord : TEXCOORD0,
uniform sampler2D colorMap : TEXUNIT0) : COLOR
{
float4 sample = tex2D(colorMap, vTexcoord);

float r = dot(sample.xyz, float3(0.393, 0.769, 0.189));
float g = dot(sample.xyz, float3(0.349, 0.686, 0.168));
float b = dot(sample.xyz, float3(0.272, 0.534, 0.131));

return float4(r, g, b, 1.0);
}
10 changes: 10 additions & 0 deletions Data/DaedalusX64/Shaders/Sepia Tone_v.cg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
void main(
float3 position,
float2 texcoord,
uniform float4x4 wvp,
out float4 vPosition : POSITION,
out float2 vTexcoord : TEXCOORD0)
{
vPosition = mul(wvp,float4(position, 1.f));
vTexcoord = texcoord;
}

0 comments on commit 445a91a

Please sign in to comment.