Hyangran Park | 36dc829 | 2017-05-02 16:27:29 +0900 | [diff] [blame] | 1 | Texture2D txDiffuseA : register( t0 );
|
| 2 | Texture2D txDiffuseB : register( t1 );
|
| 3 |
|
| 4 | SamplerState samLinearA : register( s0 );
|
| 5 | SamplerState samLinearB : register( s1 );
|
| 6 |
|
| 7 | cbuffer cbNeverChanges : register( b0 )
|
| 8 | {
|
| 9 | matrix View;
|
| 10 | };
|
| 11 |
|
| 12 | cbuffer cbChangeOnResize : register( b1 )
|
| 13 | {
|
| 14 | matrix Projection;
|
| 15 | };
|
| 16 |
|
| 17 | cbuffer cbChangesEveryFrame : register( b2 )
|
| 18 | {
|
| 19 | matrix World;
|
| 20 | float4 vMeshColor;
|
| 21 | };
|
| 22 |
|
| 23 |
|
| 24 | struct VS_INPUT
|
| 25 | {
|
| 26 | float4 Pos : POSITION;
|
| 27 | float2 Tex : TEXCOORD0;
|
| 28 | };
|
| 29 |
|
| 30 | struct PS_INPUT
|
| 31 | {
|
| 32 | float4 Pos : SV_POSITION;
|
| 33 | float2 Tex : TEXCOORD0;
|
| 34 | };
|
| 35 |
|
| 36 |
|
| 37 | float4 main( PS_INPUT input) : SV_Target
|
| 38 | {
|
| 39 | PS_INPUT output = (PS_INPUT)0;
|
| 40 | output.Pos = mul( input.Pos, World );
|
| 41 | output.Pos = mul( output.Pos, View );
|
| 42 | output.Pos = mul( output.Pos, Projection );
|
| 43 | output.Tex = input.Tex;
|
| 44 | return txDiffuseA.Sample( samLinearA, output.Tex ) * vMeshColor;
|
| 45 | }
|