-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
There are a number of duplicate shader routines we should combine into a single shader to save disk space, and remove unexpected errors in one copy but not the other.
- Loading branch information
Showing
3 changed files
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#include "shared.effect" | ||
|
||
uniform texture2D Channel0; | ||
uniform texture2D Channel1; | ||
|
||
//------------------------------------------------------------------------------ | ||
// Technique: Restore Alpha | ||
//------------------------------------------------------------------------------ | ||
// Parameters: | ||
// - Channel0: RGBX Texture | ||
// - Channel1: XXXA Texture | ||
|
||
float4 PSRestoreAlpha(VertexData vtx) : TARGET { | ||
float4 rgbx = Channel0.Sample(BlankSampler, vtx.uv); | ||
float4 xxxa = Channel1.Sample(BlankSampler, vtx.uv); | ||
rgbx.a = xxxa.a; | ||
return rgbx; | ||
}; | ||
|
||
technique RestoreAlpha | ||
{ | ||
pass | ||
{ | ||
vertex_shader = DefaultVertexShader(vtx); | ||
pixel_shader = PSRestoreAlpha(vtx); | ||
}; | ||
}; |