yum-mirror/glslang
git clone https://git.yummers.dev/yum-mirror/glslang
83768cb5
main
1SamplerComparisonState g_sSamp : register(s0 ); 2 3uniform Texture1D < float4 > g_tTex1df4 : register(t0 ); 4Texture1D < int4 > g_tTex1di4 ; 5Texture1D < uint4 > g_tTex1du4 ; 6 7Texture2D < float4 > g_tTex2df4 ; 8Texture2D < int4 > g_tTex2di4 ; 9Texture2D < uint4 > g_tTex2du4 ; 10 11Texture3D < float4 > g_tTex3df4 ; 12Texture3D < int4 > g_tTex3di4 ; 13Texture3D < uint4 > g_tTex3du4 ; 14 15TextureCube < float4 > g_tTexcdf4 ; 16TextureCube < int4 > g_tTexcdi4 ; 17TextureCube < uint4 > g_tTexcdu4 ; 18 19Texture1DArray < float4 > g_tTex1df4a ; 20Texture1DArray < int4 > g_tTex1di4a ; 21Texture1DArray < uint4 > g_tTex1du4a ; 22 23Texture2DArray < float4 > g_tTex2df4a ; 24Texture2DArray < int4 > g_tTex2di4a ; 25Texture2DArray < uint4 > g_tTex2du4a ; 26 27TextureCubeArray < float4 > g_tTexcdf4a ; 28TextureCubeArray < int4 > g_tTexcdi4a ; 29TextureCubeArray < uint4 > g_tTexcdu4a ; 30 31struct PS_OUTPUT 32{ 33float4 Color : SV_Target0 ; 34float Depth : SV_Depth ; 35}; 36 37PS_OUTPUT main () 38{ 39PS_OUTPUT psout ; 40 41// 1D 42float r01 = g_tTex1df4 . SampleCmp ( g_sSamp , 0.1 , 0.75 , 2 ); 43float r03 = g_tTex1di4 . SampleCmp ( g_sSamp , 0.1 , 0.75 , 2 ); 44float r05 = g_tTex1du4 . SampleCmp ( g_sSamp , 0.1 , 0.75 , 2 ); 45 46// 2D 47float r21 = g_tTex2df4 . SampleCmp ( g_sSamp , float2 ( 0.1 , 0.2 ), 0.75 , int2 ( 2 , 3 )); 48float r23 = g_tTex2di4 . SampleCmp ( g_sSamp , float2 ( 0.1 , 0.2 ), 0.75 , int2 ( 2 , 3 )); 49float r25 = g_tTex2du4 . SampleCmp ( g_sSamp , float2 ( 0.1 , 0.2 ), 0.75 , int2 ( 2 , 3 )); 50 51// *** There's no SampleCmp on 3D textures 52 53// This page: https://msdn.microsoft.com/en-us/library/windows/desktop/bb509696(v=vs.85).aspx 54// claims offset is supported for cube textures, but FXC does not accept it, and that does 55// not match other methods, so it may be a documentation bug. Those lines are commented 56// out below. 57// Cube 58// float r51 = g_tTexcdf4 . SampleCmp(g_sSamp, float3(0.1, 0.2, 0.3), 0.75, int3(2,3,4)); 59// float r53 = g_tTexcdi4 . SampleCmp(g_sSamp, float3(0.1, 0.2, 0.3), 0.75, int3(2,3,4)); 60// float r55 = g_tTexcdu4 . SampleCmp(g_sSamp, float3(0.1, 0.2, 0.3), 0.75, int3(2,3,4)); 61 62psout . Color = 1.0 ; 63psout . Depth = 1.0 ; 64 65return psout ; 66}