Atlas - D3D11_VertexShader.hlsl
Home / ext / SDL / src / render / direct3d11 Lines: 1 | Size: 798 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1#pragma pack_matrix( row_major ) 2 3cbuffer VertexShaderConstants : register(b0) 4{ 5 matrix model; 6 matrix projectionAndView; 7}; 8 9struct VertexShaderInput 10{ 11 float3 pos : POSITION; 12 float2 tex : TEXCOORD0; 13 float4 color : COLOR0; 14}; 15 16struct VertexShaderOutput 17{ 18 float4 pos : SV_POSITION; 19 float2 tex : TEXCOORD0; 20 float4 color : COLOR0; 21}; 22 23VertexShaderOutput main(VertexShaderInput input) 24{ 25 VertexShaderOutput output; 26 float4 pos = float4(input.pos, 1.0f); 27 28 // Transform the vertex position into projected space. 29 pos = mul(pos, model); 30 pos = mul(pos, projectionAndView); 31 output.pos = pos; 32 33 // Pass through texture coordinates and color values without transformation 34 output.tex = input.tex; 35 output.color = input.color; 36 37 return output; 38} 39[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.