|
23 | 23 |
|
24 | 24 | # define TEXTURE(Name) const texture2d<float> Name |
25 | 25 | # define TEXTURE_ARRAY(Name, Size) const array<texture2d<float>, Size> Name |
26 | | -# define WTEXTURE(Name) texture2d<float, access::write> Name |
| 26 | +# define WTEXTURE(Name, Format) texture2d<float, access::write> Name |
27 | 27 | # define SAMPLER_ARRAY(Name, Size) const array<sampler, Size> Name |
28 | 28 | # define BUFFER(Name, Type) const device Type* Name |
29 | 29 | # define CONSTANT_BUFFER(Name, Type) constant GlobalConstants& Name |
|
33 | 33 | # define TextureStore(Texture, u2Coord, f4Value) Texture[u2Coord] = f4Value |
34 | 34 | # define TextureDimensions(Texture, Dim) Texture.GetDimensions(Dim.x, Dim.y) |
35 | 35 |
|
36 | | -# define TEXTURE(Name) Texture2D<float4> Name |
37 | | -# define TEXTURE_ARRAY(Name, Size) Texture2D<float4> Name[Size] |
38 | | -# define WTEXTURE(Name) RWTexture2D<float4> Name |
39 | | -# define SAMPLER_ARRAY(Name, Size) SamplerState Name[Size] |
40 | | -# define BUFFER(Name, Type) StructuredBuffer<Type> Name |
41 | | -# define CONSTANT_BUFFER(Name, Type) ConstantBuffer<Type> Name |
| 36 | +# define TEXTURE(Name) Texture2D<float4> Name |
| 37 | +# define TEXTURE_ARRAY(Name, Size) Texture2D<float4> Name[Size] |
| 38 | +# define WTEXTURE(Name, Format) VK_IMAGE_FORMAT(Format) RWTexture2D<float4> Name |
| 39 | +# define SAMPLER_ARRAY(Name, Size) SamplerState Name[Size] |
| 40 | +# define BUFFER(Name, Type) StructuredBuffer<Type> Name |
| 41 | +# define CONSTANT_BUFFER(Name, Type) ConstantBuffer<Type> Name |
42 | 42 | #endif |
43 | 43 |
|
44 | 44 | // Returns 0 when occluder is found, and 1 otherwise |
@@ -213,7 +213,7 @@ BEGIN_SHADER_DECLARATION(CSMain) |
213 | 213 | SAMPLER_ARRAY( g_Samplers, NUM_SAMPLERS) MTL_BINDING(sampler, 0) END_ARG |
214 | 214 |
|
215 | 215 | // m_pRayTracingScreenResourcesSign |
216 | | - WTEXTURE( g_RayTracedTex) MTL_BINDING(texture, 5) END_ARG |
| 216 | + WTEXTURE( g_RayTracedTex, "rgba16f") MTL_BINDING(texture, 5) END_ARG |
217 | 217 | TEXTURE( g_GBuffer_Normal) MTL_BINDING(texture, 6) END_ARG |
218 | 218 | TEXTURE( g_GBuffer_Depth) MTL_BINDING(texture, 7) END_ARG |
219 | 219 | |
|
0 commit comments