-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54885c4
commit f6bba66
Showing
8 changed files
with
189,843 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
struct PS_INPUT | ||
{ | ||
float4 Position : SV_Position; | ||
float3 Normal : NORMAL; | ||
float3 Color : COLOR0; | ||
}; | ||
|
||
struct PS_OUTPUT | ||
{ | ||
float4 Color : SV_Target0; | ||
}; | ||
|
||
PS_OUTPUT main(PS_INPUT input) | ||
{ | ||
PS_OUTPUT output = (PS_OUTPUT)0; | ||
output.Color = float4(input.Normal, 1.0); | ||
return output; | ||
} |
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,35 @@ | ||
cbuffer FrameData : register(b0) | ||
{ | ||
matrix WorldMatrix; | ||
matrix ViewMatrix; | ||
matrix ProjMatrix; | ||
}; | ||
|
||
struct VS_INPUT | ||
{ | ||
float4 Position : POSITION; | ||
float3 Normal : NORMAL; | ||
float3 Color : COLOR0; | ||
}; | ||
|
||
struct VS_OUTPUT | ||
{ | ||
float4 Position : SV_Position; | ||
float3 Normal : NORMAL; | ||
float3 Color : COLOR0; | ||
}; | ||
|
||
VS_OUTPUT main(VS_INPUT input) | ||
{ | ||
VS_OUTPUT output = (VS_OUTPUT)0; | ||
|
||
output.Position = input.Position; | ||
output.Position = mul(output.Position, WorldMatrix); | ||
output.Position = mul(output.Position, ViewMatrix); | ||
output.Position = mul(output.Position, ProjMatrix); | ||
|
||
output.Normal = input.Normal; | ||
output.Color = input.Color; | ||
|
||
return output; | ||
} |
Oops, something went wrong.