Hey,
I have problem with DXR HLSL code. I am trying to create simplest possible world-space shader, using ray-tracing DirectX12/DXR. I tried to achieve (as you can see in closest hit shader) flat shading of model. However, here is the result:

Which indicates, that every pixel is hitting geometry, which shouldn't be true.

As geometry I am using simple sphere presented above.
struct Vertex
{
float3 position;
float3 normal;
float3 tangent;
float3 binormal;
float2 uv;
};
struct RayPayload
{
float4 color;
};
struct Attributes
{
float2 bary;
};
struct SceneConstantBuffer
{
matrix projectionToWorld;
float4 cameraPosition;
float4 lightPosition;
float4 lightAmbientColor;
float4 lightDiffuseColor;
};
ConstantBuffer<SceneConstantBuffer> g_sceneCB : register(b0 …