mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
PostProcessing: Add support for user-supplied anaglyph shaders.
There are lots of different anaglyph glasses out there and there may be even more creative uses for stereoscopic post-processing shaders.
This commit is contained in:
12
Data/Sys/Shaders/Anaglyph/grayscale2.glsl
Normal file
12
Data/Sys/Shaders/Anaglyph/grayscale2.glsl
Normal file
@ -0,0 +1,12 @@
|
||||
// Anaglyph Red-Cyan luma grayscale shader
|
||||
// Info: http://www.oreillynet.com/cs/user/view/cs_msg/8691
|
||||
|
||||
void main()
|
||||
{
|
||||
float3 luma = float3(0.222, 0.707, 0.071);
|
||||
float4 c0 = SampleLayer(0);
|
||||
float avg0 = dot(c0.rgb, luma);
|
||||
float4 c1 = SampleLayer(1);
|
||||
float avg1 = dot(c1.rgb, luma);
|
||||
SetOutput(float4(avg0, avg1, avg1, c0.a));
|
||||
}
|
Reference in New Issue
Block a user