forked from TomGillen/Myre
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented all of transparencies except shadowing and the actual pee…
…ling algorithm Signed-off-by: Martin Evans <martindevans@gmail.com>
- Loading branch information
1 parent
830a7bd
commit 6346359
Showing
27 changed files
with
1,042 additions
and
314 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,36 @@ | ||
#include "FullScreenQuad.fxh" | ||
|
||
void PixelShaderFunction(out float4 out_Depth : COLOR0, | ||
out float4 out_Normals : COLOR1, | ||
out float4 out_Diffuse : COLOR2) | ||
float4 defaultDepth = float4(1, 1, 1, 1); | ||
float4 defaultNormals = float4(0, 0, 0, 0); | ||
float4 defaultDiffuse = float4(0, 0, 0, 1); | ||
|
||
void Pixel_DepthNormalsDiffuse(out float4 out_Depth : COLOR0, out float4 out_Normals : COLOR1, out float4 out_Diffuse : COLOR2) | ||
{ | ||
out_Depth = defaultDepth; | ||
out_Normals = defaultNormals; | ||
out_Diffuse = defaultDiffuse; | ||
} | ||
|
||
void Pixel_NormalsDiffuse(out float4 out_Normals : COLOR0, out float4 out_Diffuse : COLOR1) | ||
{ | ||
out_Depth = float4(1, 1, 1, 1); | ||
out_Normals = float4(0, 0, 0, 1); | ||
out_Diffuse = float4(0, 0, 0, 1); | ||
out_Normals = defaultNormals; | ||
out_Diffuse = defaultDiffuse; | ||
} | ||
|
||
technique Technique1 | ||
technique Clear_DepthNormalsDiffuse | ||
{ | ||
pass Pass1 | ||
{ | ||
// TODO: set renderstates here. | ||
pass Pass1 | ||
{ | ||
VertexShader = compile vs_2_0 FullScreenQuadVS(); | ||
PixelShader = compile ps_2_0 Pixel_DepthNormalsDiffuse(); | ||
} | ||
} | ||
|
||
VertexShader = compile vs_2_0 FullScreenQuadVS(); | ||
PixelShader = compile ps_2_0 PixelShaderFunction(); | ||
} | ||
technique Clear_NormalsDiffuse | ||
{ | ||
pass Pass1 | ||
{ | ||
VertexShader = compile vs_2_0 FullScreenQuadVS(); | ||
PixelShader = compile ps_2_0 Pixel_NormalsDiffuse(); | ||
} | ||
} |
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
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,12 @@ | ||
| ||
namespace Myre.Graphics.Geometry | ||
{ | ||
public enum DepthSort | ||
{ | ||
None, | ||
|
||
BackToFront, | ||
|
||
FrontToBack | ||
} | ||
} |
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
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.