init commit

This commit is contained in:
2024-06-09 21:34:23 +02:00
commit b81c0af596
177 changed files with 8799 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
void vs_main()
{
float x = 2.0f + 5.0f;
}

View File

@@ -0,0 +1,15 @@
cbuffer __PROPERTIES : register(b0)
{
float4 color;
}
float3 vs_main(float3 pos : POSITION) : SV_POSITION
{
return pos;
}
float4 ps_main() : SV_TARGET
{
return color;
}

View File

@@ -0,0 +1,7 @@
void vs_main()
{
float x = 5.0f;
float y = 3000.0f;
float z = y * y + x;
}

View File

@@ -0,0 +1,4 @@
struct Foo;
struct Foo {}

View File

@@ -0,0 +1,4 @@
void vs_main()
{
}

View File

@@ -0,0 +1,5 @@
float3 vs_main(float3 pos : POSITION)
{
return pos;
}

View File

@@ -0,0 +1,7 @@
float4 vs_main(float4 pos : POSITION) : SV_POSITION
{
float x = 5.0f;
x = 7.0f;
return pos;
}

View File

@@ -0,0 +1,12 @@
int foo();
int foo()
{
return 4;
}
void vs_main()
{
foo();
}

View File

@@ -0,0 +1,11 @@
void foo();
void vs_main()
{
foo();
}
void foo()
{
}

View File

@@ -0,0 +1,9 @@
void vs_main()
{
}
float4 ps_main() : SV_TARGET
{
return float4(1, 1, 1, 1);
}

View File

@@ -0,0 +1,15 @@
cbuffer __PROPERTIES : register(b0)
{
float4 color;
}
float3 vs_main(float3 pos : POSITION, float2 uv) : SV_POSITION
{
return pos;
}
float4 ps_main() : SV_TARGET
{
return color;
}

View File

@@ -0,0 +1,19 @@
int foo();
float bar();
int foo()
{
return 5;
}
float bar()
{
return 1235.0f * 500;
}
void vs_main()
{
int x = foo();
float y = bar();
}

View File

@@ -0,0 +1,19 @@
float4 foo();
float3 vs_main(float3 pos : POSITION) : SV_POSITION
{
return pos;
}
float4 foo()
{
return float4(1.0f, 1.0f, 1.0f, 1.0f);
}
float4 ps_main() : SV_TARGET
{
float4 y = foo();
float4 color = y;
return color;
}

View File

@@ -0,0 +1,21 @@
struct Foo;
float foo(Foo f);
struct Foo
{
float some_data;
}
float foo(Foo f)
{
return f.some_data * 2.0f;
}
void vs_main()
{
Foo f;
f.some_data = 4.0f;
float d = foo(f);
}

View File

@@ -0,0 +1,10 @@
float3 vs_main(float3 pos : POSITION) : SV_POSITION
{
return pos;
}
float4 ps_main() : SV_TARGET
{
return float4(1.0f, 1.0f, 1.0f, 1.0f);
}

View File

@@ -0,0 +1,8 @@
void vs_main()
{
float x = 2;
float y = 5;
float z = 10;
float w = x * y + y * z - x / y * x;
}

View File

@@ -0,0 +1,13 @@
struct Data;
struct Data
{
float4 color;
}
void vs_main()
{
Data d;
float4 x = d.color;
}

View File

@@ -0,0 +1,20 @@
struct Foo;
struct Bar;
struct Foo
{
float4 color;
}
struct Bar
{
Foo t;
}
void vs_main()
{
Foo f;
Bar b;
b.t = f;
}

View File

@@ -0,0 +1,5 @@
void vs_main()
{
float4 f = float4(1, 1, 1, 1);
}