test / samples /wp8 /OcvImageManipulation /PhoneXamlDirect3DApp1 /PhoneXamlDirect3DApp1Comp /SimpleVertexShader.hlsl
Download samples/wp8/OcvImageManipulation/PhoneXamlDirect3DApp1/PhoneXamlDirect3DApp1Comp/SimpleVertexShader.hlsl from tgollogly/test: direct link, hf CLI and curl.
- Browser
- Download file 1.02 kB
-
https://huggingface.co/tgollogly/test/resolve/main/samples/wp8/OcvImageManipulation/PhoneXamlDirect3DApp1/PhoneXamlDirect3DApp1Comp/SimpleVertexShader.hlsl
- Command line
-
hf download hf://tgollogly/test/samples/wp8/OcvImageManipulation/PhoneXamlDirect3DApp1/PhoneXamlDirect3DApp1Comp/SimpleVertexShader.hlsl
-
curl -L -o SimpleVertexShader.hlsl https://huggingface.co/tgollogly/test/resolve/main/samples/wp8/OcvImageManipulation/PhoneXamlDirect3DApp1/PhoneXamlDirect3DApp1Comp/SimpleVertexShader.hlsl
1.02 kB
| cbuffer ModelViewProjectionConstantBuffer : register(b0) | |
| { | |
| matrix model; | |
| matrix view; | |
| matrix projection; | |
| }; | |
| struct VertexInputType | |
| { | |
| float4 position : POSITION; | |
| float2 tex : TEXCOORD0; | |
| }; | |
| struct PixelInputType | |
| { | |
| float4 position : SV_POSITION; | |
| float2 tex : TEXCOORD0; | |
| }; | |
| //////////////////////////////////////////////////////////////////////////////// | |
| // Vertex Shader | |
| //////////////////////////////////////////////////////////////////////////////// | |
| PixelInputType main(VertexInputType input) | |
| { | |
| PixelInputType output; | |
| // Change the position vector to be 4 units for proper matrix calculations. | |
| input.position.w = 1.0f; | |
| // Calculate the position of the vertex against the world, view, and projection matrices. | |
| output.position = mul(input.position, model); | |
| output.position = mul(output.position, view); | |
| output.position = mul(output.position, projection); | |
| // Store the texture coordinates for the pixel shader. | |
| output.tex = input.tex; | |
| return output; | |
| } | |