steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 1 | SamplerComparisonState g_sSampCmp : register(s0); |
| 2 | |
| 3 | Texture1D g_tTex1df4a : register(t1); |
| 4 | |
| 5 | uniform Texture1D <float4> g_tTex1df4 : register(t0); |
| 6 | Texture1D <int4> g_tTex1di4; |
| 7 | Texture1D <uint4> g_tTex1du4; |
| 8 | |
| 9 | Texture2D <float4> g_tTex2df4; |
| 10 | Texture2D <int4> g_tTex2di4; |
| 11 | Texture2D <uint4> g_tTex2du4; |
| 12 | |
| 13 | Texture3D <float4> g_tTex3df4; |
| 14 | Texture3D <int4> g_tTex3di4; |
| 15 | Texture3D <uint4> g_tTex3du4; |
| 16 | |
| 17 | TextureCube <float4> g_tTexcdf4; |
| 18 | TextureCube <int4> g_tTexcdi4; |
| 19 | TextureCube <uint4> g_tTexcdu4; |
| 20 | |
| 21 | struct PS_OUTPUT |
| 22 | { |
| 23 | float4 Color : SV_Target0; |
| 24 | float Depth : SV_Depth; |
| 25 | }; |
| 26 | |
| 27 | uniform float c1; |
| 28 | uniform float2 c2; |
| 29 | uniform float3 c3; |
| 30 | uniform float4 c4; |
| 31 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 32 | |
| 33 | |
| 34 | |
| 35 | |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 36 | |
| 37 | PS_OUTPUT main() |
| 38 | { |
| 39 | PS_OUTPUT psout; |
| 40 | |
| 41 | uint status; |
| 42 | |
| 43 | // no 1D gathers |
| 44 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 45 | float4 txval001 = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0)); |
| 46 | int4 txval011 = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,-1)); |
| 47 | uint4 txval021 = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,1)); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 48 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 49 | float4 txval004 = g_tTex2df4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
| 50 | int4 txval014 = g_tTex2di4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,-1), int2(1,-1), int2(1,-1), int2(1,-1)); |
| 51 | uint4 txval024 = g_tTex2du4 . GatherCmpRed(g_sSampCmp, c2, 0.75, int2(1,1), int2(1,1), int2(1,1), int2(1,1)); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 52 | |
steve-lunarg | 6817f81 | 2017-05-01 21:59:34 -0600 | [diff] [blame] | 53 | float4 txval401 = g_tTex2df4 . GatherCmp(g_sSampCmp, c2, 0.75, int2(1,0)); |
| 54 | int4 txval411 = g_tTex2di4 . GatherCmp(g_sSampCmp, c2, 0.75, int2(1,-1)); |
| 55 | uint4 txval421 = g_tTex2du4 . GatherCmp(g_sSampCmp, c2, 0.75, int2(1,1)); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 56 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 57 | // GatherCmpGreen not implemented pending OpImageDrefGather component input |
| 58 | // float4 txval101 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0)); |
| 59 | // int4 txval111 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0)); |
| 60 | // uint4 txval121 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0)); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 61 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 62 | // float4 txval104 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
| 63 | // int4 txval114 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
| 64 | // uint4 txval124 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 65 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 66 | // float4 txval10s = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), status); |
| 67 | // int4 txval11s = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), status); |
| 68 | // uint4 txval12s = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), status); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 69 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 70 | // float4 txval104 = g_tTex2df4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); |
| 71 | // int4 txval114 = g_tTex2di4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); |
| 72 | // uint4 txval124 = g_tTex2du4 . GatherCmpGreen(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 73 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 74 | // GatherCmpBlue not implemented pending OpImageDrefGather component input |
| 75 | // float4 txval201 = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0)); |
| 76 | // int4 txval211 = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0)); |
| 77 | // uint4 txval221 = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0)); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 78 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 79 | // float4 txval204 = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
| 80 | // int4 txval214 = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
| 81 | // uint4 txval224 = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 82 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 83 | // float4 txval204s = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); |
| 84 | // int4 txval214s = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); |
| 85 | // uint4 txval224s = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 86 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 87 | // float4 txval20s = g_tTex2df4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), status); |
| 88 | // int4 txval21s = g_tTex2di4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), status); |
| 89 | // uint4 txval22s = g_tTex2du4 . GatherCmpBlue(g_sSampCmp, c2, 0.75, int2(1,0), status); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 90 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 91 | // GatherCmpAlpha not implemented pending OpImageDrefGather component input |
| 92 | // float4 txval301 = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0)); |
| 93 | // int4 txval311 = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0)); |
| 94 | // uint4 txval321 = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0)); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 95 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 96 | // float4 txval304 = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
| 97 | // int4 txval314 = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
| 98 | // uint4 txval324 = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0)); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 99 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 100 | // float4 txval304s = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); |
| 101 | // int4 txval314s = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); |
| 102 | // uint4 txval324s = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), int2(1,0), int2(1,0), int2(1,0), status); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 103 | |
steve-lunarg | d00b026 | 2017-03-09 08:59:45 -0700 | [diff] [blame] | 104 | // float4 txval30s = g_tTex2df4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), status); |
| 105 | // int4 txval31s = g_tTex2di4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), status); |
| 106 | // uint4 txval32s = g_tTex2du4 . GatherCmpAlpha(g_sSampCmp, c2, 0.75, int2(1,0), status); |
steve-lunarg | 7dfcf4d | 2016-07-31 10:37:02 -0600 | [diff] [blame] | 107 | |
| 108 | // no 3D gathers with offset |
| 109 | |
| 110 | psout.Color = 1.0; |
| 111 | psout.Depth = 1.0; |
| 112 | |
| 113 | return psout; |
| 114 | } |