This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository direct3d.
View the commit online.
commit 578368fea80070651d18466210e286d02fa891bf
Author: Vincent Torri <vto...@outlook.fr>
AuthorDate: Wed Jul 20 08:06:21 2022 +0200
third tutorial code: add shader
---
src/shader_2.hlsl | 32 ++++++++++++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/src/shader_2.hlsl b/src/shader_2.hlsl
new file mode 100644
index 0000000..ed2b87e
--- /dev/null
+++ b/src/shader_2.hlsl
@@ -0,0 +1,32 @@
+cbuffer cv_viewport : register(b0)
+{
+ float2 viewport_inv_size;
+ float2 dummy;
+}
+
+struct vs_input
+{
+ uint2 position : POSITION;
+};
+
+struct ps_input
+{
+ float4 position : SV_POSITION;
+};
+
+ps_input main_vs(vs_input input )
+{
+ ps_input output;
+ float2 p = input.position;
+ p *= viewport_inv_size;
+ p *= 2.0f;
+ p -= 1.0f;
+ p.y *= -1.0f;
+ output.position = float4(p, 0.0f, 1.0f);
+ return output;
+}
+
+float4 main_ps(ps_input input) : SV_TARGET
+{
+ return float4(1.0f, 0.0f, 1.0f, 1.0f);
+}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.