summaryrefslogtreecommitdiffstats
path: root/src/demos/dualDepthPeeling/shader/front_peeling_final.fp
blob: dbc9a653379f534ebeb8cf583b4e6a4e5ddf3249 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//--------------------------------------------------------------------------------------
// Order Independent Transparency with Depth Peeling
//
// Author: Louis Bavoil
// Email: sdkfeedback@nvidia.com
//
// Copyright (c) NVIDIA Corporation. All rights reserved.
//--------------------------------------------------------------------------------------

uniform samplerRECT ColorTex;
uniform vec3 BackgroundColor;

void main(void)
{
	vec4 frontColor = textureRect(ColorTex, gl_FragCoord.xy);
	gl_FragColor.rgb = frontColor + BackgroundColor * frontColor.a;
}