Skip to content
This repository was archived by the owner on Nov 1, 2020. It is now read-only.
This repository was archived by the owner on Nov 1, 2020. It is now read-only.

Counting rays #205

@Nielsbishere

Description

@Nielsbishere

Is your feature request related to a problem? Please describe.
Variable roughness with soft shadows and recursions will amp up the ray count dramatically and viewing the number of rays will give insight into how an optimization affects the ray count and how that ray count affects performance. Not only is this good for reflections, this also allows us to see how many rays (total) our program is casting; and which parts we can optimize further.

Describe the solution you'd like
StructuredBuffer counter with InterlockedAdd, to serve as an atomic counter where for every ray you increment. counter[0] is the camera rays (0 for hybrid), counter[1] is the shadow rays, counter[2] is the reflection rays, counter[3] is the AO rays, counter[4] is the GI rays.
This structure can be read from the GPU and can use a shader to render text with the count (to allow triple buffering) or can be read from the CPU and output to the console.

Describe alternatives you've considered
I tried looking into it through nsight, but it doesn't provide any insight into those stats.

Additional context
N.A.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions