steve-lunarg | 68f2c14 | 2016-07-26 08:57:53 -0600 | [diff] [blame] | 1 | SamplerState g_sSamp : register(s0); |
| 2 | |
| 3 | Texture1DArray g_tTex1df4a : register(t1); |
| 4 | |
| 5 | uniform Texture1DArray <float4> g_tTex1df4 : register(t0); |
| 6 | Texture1DArray <int4> g_tTex1di4a; |
| 7 | Texture1DArray <uint4> g_tTex1du4a; |
| 8 | |
| 9 | Texture2DArray <float4> g_tTex2df4a; |
| 10 | Texture2DArray <int4> g_tTex2di4a; |
| 11 | Texture2DArray <uint4> g_tTex2du4a; |
| 12 | |
| 13 | TextureCubeArray <float4> g_tTexcdf4a; |
| 14 | TextureCubeArray <int4> g_tTexcdi4a; |
| 15 | TextureCubeArray <uint4> g_tTexcdu4a; |
| 16 | |
| 17 | struct PS_OUTPUT |
| 18 | { |
| 19 | float4 Color : SV_Target0; |
| 20 | float Depth : SV_Depth; |
| 21 | }; |
| 22 | |
| 23 | PS_OUTPUT main() |
| 24 | { |
| 25 | PS_OUTPUT psout; |
| 26 | |
| 27 | // LOD queries do not pass array level in coordinate. |
| 28 | float txval10 = g_tTex1df4a . CalculateLevelOfDetail(g_sSamp, 0.1); |
| 29 | float txval11 = g_tTex1di4a . CalculateLevelOfDetail(g_sSamp, 0.2); |
| 30 | float txval12 = g_tTex1du4a . CalculateLevelOfDetail(g_sSamp, 0.3); |
| 31 | |
| 32 | float txval20 = g_tTex2df4a . CalculateLevelOfDetail(g_sSamp, float2(0.1, 0.2)); |
| 33 | float txval21 = g_tTex2di4a . CalculateLevelOfDetail(g_sSamp, float2(0.3, 0.4)); |
| 34 | float txval22 = g_tTex2du4a . CalculateLevelOfDetail(g_sSamp, float2(0.5, 0.6)); |
| 35 | |
| 36 | float txval40 = g_tTexcdf4a . CalculateLevelOfDetail(g_sSamp, float3(0.1, 0.2, 0.3)); |
| 37 | float txval41 = g_tTexcdi4a . CalculateLevelOfDetail(g_sSamp, float3(0.4, 0.5, 0.6)); |
| 38 | float txval42 = g_tTexcdu4a . CalculateLevelOfDetail(g_sSamp, float3(0.7, 0.8, 0.9)); |
| 39 | |
| 40 | psout.Color = 1.0; |
| 41 | psout.Depth = 1.0; |
| 42 | |
| 43 | return psout; |
| 44 | } |