OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 // To compile these two shaders: |
| 6 // fxc /E pixelMain /T ps_2_0 accelerated_surface_win.hlsl |
| 7 // fxc /E vertexMain /T vs_2_0 accelerated_surface_win.hlsl |
| 8 // |
| 9 // fxc is in the DirectX SDK. |
| 10 |
| 11 struct Vertex { |
| 12 float4 position : POSITION; |
| 13 float2 texCoord : TEXCOORD0; |
| 14 }; |
| 15 |
| 16 texture t; |
| 17 sampler s; |
| 18 |
| 19 // Passes a position and texture coordinate to the pixel shader. |
| 20 Vertex vertexMain(Vertex input) { |
| 21 return input; |
| 22 }; |
| 23 |
| 24 // Samples a texture at the given texture coordinate and returns the result. |
| 25 float4 pixelMain(float2 texCoord : TEXCOORD0) : COLOR0 { |
| 26 return tex2D(s, texCoord); |
| 27 }; |
OLD | NEW |