diff options
| author | 3gg <3gg@shellblade.net> | 2026-03-06 13:30:59 -0800 |
|---|---|---|
| committer | 3gg <3gg@shellblade.net> | 2026-03-06 13:30:59 -0800 |
| commit | 30f41c02aec763d32e62351452da9ef582bc3472 (patch) | |
| tree | 6bec3f65bfdcbf7f1a631da21a6d613bef5db2fa /contrib/SDL-3.2.8/src/render/vulkan/VULKAN_VertexShader.hlsl | |
| parent | 452ff21ca02e315c64ceeb3f21c1ea357aeb1bc8 (diff) | |
Move contrib libraries to contrib repo
Diffstat (limited to 'contrib/SDL-3.2.8/src/render/vulkan/VULKAN_VertexShader.hlsl')
| -rw-r--r-- | contrib/SDL-3.2.8/src/render/vulkan/VULKAN_VertexShader.hlsl | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/contrib/SDL-3.2.8/src/render/vulkan/VULKAN_VertexShader.hlsl b/contrib/SDL-3.2.8/src/render/vulkan/VULKAN_VertexShader.hlsl deleted file mode 100644 index 373a179..0000000 --- a/contrib/SDL-3.2.8/src/render/vulkan/VULKAN_VertexShader.hlsl +++ /dev/null | |||
| @@ -1,45 +0,0 @@ | |||
| 1 | #pragma pack_matrix( row_major ) | ||
| 2 | |||
| 3 | struct VertexShaderConstants | ||
| 4 | { | ||
| 5 | matrix model; | ||
| 6 | matrix projectionAndView; | ||
| 7 | }; | ||
| 8 | [[vk::push_constant]] | ||
| 9 | ConstantBuffer<VertexShaderConstants> pushConstants; | ||
| 10 | |||
| 11 | struct VertexShaderInput | ||
| 12 | { | ||
| 13 | float3 pos : POSITION; | ||
| 14 | float2 tex : TEXCOORD0; | ||
| 15 | float4 color : COLOR0; | ||
| 16 | }; | ||
| 17 | |||
| 18 | struct VertexShaderOutput | ||
| 19 | { | ||
| 20 | float4 pos : SV_POSITION; | ||
| 21 | float2 tex : TEXCOORD0; | ||
| 22 | float4 color : COLOR0; | ||
| 23 | [[vk::builtin("PointSize")]] float pointSize : SV_PointSize; | ||
| 24 | }; | ||
| 25 | |||
| 26 | VertexShaderOutput mainColor(VertexShaderInput input) | ||
| 27 | { | ||
| 28 | VertexShaderOutput output; | ||
| 29 | float4 pos = float4(input.pos, 1.0f); | ||
| 30 | |||
| 31 | // Transform the vertex position into projected space. | ||
| 32 | pos = mul(pos, pushConstants.model); | ||
| 33 | pos = mul(pos, pushConstants.projectionAndView); | ||
| 34 | output.pos = pos; | ||
| 35 | |||
| 36 | // Pass through texture coordinates and color values without transformation | ||
| 37 | output.tex = input.tex; | ||
| 38 | output.color = input.color; | ||
| 39 | |||
| 40 | // Always output pointSize so that this VS can be used with points | ||
| 41 | output.pointSize = 1.0; | ||
| 42 | |||
| 43 | return output; | ||
| 44 | } | ||
| 45 | |||
