Ray Tracing doesnt look like shit anymore

This commit is contained in:
Dynamitos
2024-12-25 14:59:08 +01:00
parent 5fae4f02e8
commit 7f4d7c7f71
21 changed files with 360 additions and 87 deletions
+18 -4
View File
@@ -3,8 +3,11 @@ import MaterialParameter;
struct RayTracingParams
{
RaytracingAccelerationStructure scene;
RWTexture2D<float4> radianceAccumulator;
RWTexture2D<float4> image;
StructuredBuffer<uint> indexBuffer;
TextureCube<float4> skyBox;
SamplerState skyBoxSampler;
};
layout(set=5)
ParameterBlock<RayTracingParams> pRayTracingParams;
@@ -15,10 +18,21 @@ struct CallablePayload
float3 color;
};
struct ShadingParams
{
float3 position;
float3 normal;
float3 normalLight;
};
struct MaterialParams
{
float4 color;
float3 emissive;
}
struct RayPayload
{
float3 color;
float alpha;
float3 intersection_WS;
float3 normal_WS;
ShadingParams shading;
MaterialParams material;
};