Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cbuffer MatrixBuffer : register(b0) {
- matrix worldMatrix;
- matrix viewMatrix;
- matrix projectionMatrix;
- };
- struct VertexShaderInput {
- float4 position: POSITION0;
- float4 normal: NORMAL0;
- float2 texCoord: TEXCOORD0;
- };
- struct PixelShaderInput {
- float4 position: SV_POSITION;
- float4 normal: NORMAL;
- float2 texCoord: TEXCOORD;
- };
- PixelShaderInput vsEntryPoint(VertexShaderInput input) {
- PixelShaderInput output;
- output.position = mul(input.position, worldMatrix);
- output.position = mul(output.position, viewMatrix);
- output.position = mul(output.position, projectionMatrix);
- output.normal = input.normal;
- output.texCoord = input.texCoord;
- return output;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement