| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // @gyp_namespace(ui_surface) | 5 // @gyp_namespace(ui_surface) |
| 6 // Compiles into C++ as 'accelerated_surface_win_hlsl_compiled.h' | 6 // Compiles into C++ as 'accelerated_surface_win_hlsl_compiled.h' |
| 7 | 7 |
| 8 struct Vertex { | 8 struct Vertex { |
| 9 float4 position : POSITION; | 9 float4 position : POSITION; |
| 10 float2 texCoord : TEXCOORD0; | 10 float2 texCoord : TEXCOORD0; |
| 11 }; | 11 }; |
| 12 | 12 |
| 13 texture t; | 13 texture t; |
| 14 sampler s; | 14 sampler s; |
| 15 | 15 |
| 16 // @gyp_compile(vs_2_0, vsOneTexture) | 16 // @gyp_compile(vs_2_0, vsOneTexture) |
| 17 // | 17 // |
| 18 // Passes a position and texture coordinate to the pixel shader. | 18 // Passes a position and texture coordinate to the pixel shader. |
| 19 Vertex vsOneTexture(Vertex input) { | 19 Vertex vsOneTexture(Vertex input) { |
| 20 return input; | 20 return input; |
| 21 }; | 21 }; |
| 22 | 22 |
| 23 // @gyp_compile(ps_2_0, psOneTexture) | 23 // @gyp_compile(ps_2_0, psOneTexture) |
| 24 // | 24 // |
| 25 // Samples a texture at the given texture coordinate and returns the result. | 25 // Samples a texture at the given texture coordinate and returns the result. |
| 26 float4 psOneTexture(float2 texCoord : TEXCOORD0) : COLOR0 { | 26 float4 psOneTexture(float2 texCoord : TEXCOORD0) : COLOR0 { |
| 27 return tex2D(s, texCoord); | 27 return tex2D(s, texCoord); |
| 28 }; | 28 }; |
| OLD | NEW |