aboutsummaryrefslogtreecommitdiff
path: root/demo/Shaders/meshPS.hlsl
diff options
context:
space:
mode:
Diffstat (limited to 'demo/Shaders/meshPS.hlsl')
-rw-r--r--demo/Shaders/meshPS.hlsl21
1 files changed, 21 insertions, 0 deletions
diff --git a/demo/Shaders/meshPS.hlsl b/demo/Shaders/meshPS.hlsl
new file mode 100644
index 0000000..6df4ebe
--- /dev/null
+++ b/demo/Shaders/meshPS.hlsl
@@ -0,0 +1,21 @@
+
+struct Input
+{
+ float4 position : SV_POSITION;
+ float3 normal : NORMAL;
+};
+
+float4 meshPS(Input input) : SV_TARGET
+{
+ float color = 0.1f;
+
+ color += 0.4f * max(0.f,dot(input.normal, float3(0.57f, 0.57f, 0.57f)));
+
+ color += 0.4f * max(0.f, dot(input.normal, float3(-0.57f, 0.57f, 0.57f)));
+
+ color += 0.4f * max(0.f, dot(input.normal, float3(0.57f, 0.57f, -0.57f)));
+
+ color += 0.4f * max(0.f, dot(input.normal, float3(-0.57f, 0.57f, -0.57f)));
+
+ return float4(color.xxx, 1.0f);
+} \ No newline at end of file