diff options
| author | Andrew Reidmeyer <[email protected]> | 2017-03-15 09:28:59 -0600 |
|---|---|---|
| committer | Andrew Reidmeyer <[email protected]> | 2017-03-15 09:28:59 -0600 |
| commit | f5f6a899903a309f1fc93b31c0297fc7b3b5cf46 (patch) | |
| tree | ed3dece338b579d5b51af494b2d543fb46c43fa3 /demo/Shaders/meshPS.hlsl | |
| download | flow-1.0.0.tar.xz flow-1.0.0.zip | |
Initial 1.0.0 binary releasev1.0.0
Diffstat (limited to 'demo/Shaders/meshPS.hlsl')
| -rw-r--r-- | demo/Shaders/meshPS.hlsl | 21 |
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 |