Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Hlsl path tracer #188

Open
wants to merge 112 commits into
base: bxdf_unit_tests
Choose a base branch
from
Open

Conversation

devshgraphicsprogramming
Copy link
Member

No description provided.

Fletterio and others added 30 commits January 24, 2025 23:44
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
- Multiple HitGroup. Each with closesthit and anythit shader
- Multiple Miss Shader Group.

Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: Ali Cheraghi <alichraghi@proton.me>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Signed-off-by: kevyuu <kevin.kayu@gmail.com>
Comment on lines +1 to +38
#ifndef _NBL_HLSL_EXT_RANDGEN_INCLUDED_
#define _NBL_HLSL_EXT_RANDGEN_INCLUDED_

namespace nbl
{
namespace hlsl
{
namespace ext
{
namespace RandGen
{

template<typename RNG>
struct Uniform3D
{
using rng_type = RNG;

static Uniform3D<RNG> create(uint32_t2 seed)
{
Uniform3D<RNG> retval;
retval.rng = rng_type::construct(seed);
return retval;
}

uint32_t3 operator()()
{
return uint32_t3(rng(), rng(), rng());
}

rng_type rng;
};

}
}
}
}

#endif
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it can replace your PCG32x2


[[vk::binding(1, 2)]] Buffer<uint3> sampleSequence;

[[vk::combinedImageSampler]][[vk::binding(2, 2)]] Texture2D<uint2> scramblebuf; // unused
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use it, get matching random numbers between HLSL and GLSL

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants