Open
Conversation
…ght id type to concept
Comment on lines
119
to
136
| Shape<float, PST_SPHERE>::create(float3(-1.5, 1.5, 0.0), 0.3, bxdfnode_type::INVALID_ID, 0u) | ||
| Shape<float, PST_SPHERE>::create(float3(-1.5, 1.5, 0.0), 0.3, 9u, 0u) | ||
| }; | ||
| #endif | ||
|
|
||
| #ifdef TRIANGLE_LIGHT | ||
| static const Shape<float, PST_TRIANGLE> triangles[scene_type::SCENE_LIGHT_COUNT] = { | ||
| Shape<float, PST_TRIANGLE>::create(float3(-1.8,0.35,0.3) * 10.0, float3(-1.2,0.35,0.0) * 10.0, float3(-1.5,0.8,-0.3) * 10.0, bxdfnode_type::INVALID_ID, 0u) | ||
| Shape<float, PST_TRIANGLE>::create(float3(-1.8,0.35,0.3) * 10.0, float3(-1.2,0.35,0.0) * 10.0, float3(-1.5,0.8,-0.3) * 10.0, 9u, 0u) | ||
| }; | ||
| #endif | ||
|
|
||
| #ifdef RECTANGLE_LIGHT | ||
| static const Shape<float, PST_RECTANGLE> rectangles[scene_type::SCENE_LIGHT_COUNT] = { | ||
| Shape<float, PST_RECTANGLE>::create(float3(-3.8,0.35,1.3), normalize(float3(2,0,-1))*7.0, normalize(float3(2,-5,4))*0.1, bxdfnode_type::INVALID_ID, 0u) | ||
| Shape<float, PST_RECTANGLE>::create(float3(-3.8,0.35,1.3), normalize(float3(2,0,-1))*7.0, normalize(float3(2,-5,4))*0.1, 9u, 0u) | ||
| }; | ||
| #endif | ||
|
|
||
| static const light_type lights[scene_type::SCENE_LIGHT_COUNT] = { | ||
| light_type::create(LightEminence, | ||
| light_type::create(9u, |
Member
Author
There was a problem hiding this comment.
why have you gone from nice semantic enums to nast literals like 9u with no meaning for the bxdf?
| } | ||
| }; | ||
|
|
||
| enum MaterialType : uint32_t // enum class? |
Member
Author
There was a problem hiding this comment.
enum class introduces issues to DXC unfortunately
Comment on lines
62
to
63
| uint32_t id; | ||
| uint32_t mode; | ||
| ProceduralShapeType shapeType; | ||
| uint32_t mode : 2u; |
Member
Author
There was a problem hiding this comment.
can you not fit the id in 12 bits and make everything a uint16_t ?
Member
Author
There was a problem hiding this comment.
Also what's mode ?
31_HLSLPathTracer/main.cpp
Outdated
Comment on lines
1126
to
1133
| const float rcpLog2Base = 1.0f / std::log2(guiControlled.rwmcParams.base); | ||
| const float baseRootOfStart = std::exp2(std::log2(guiControlled.rwmcParams.start) * rcpLog2Base); | ||
| const float log2BaseRootOfStart = std::log2(baseRootOfStart); | ||
| const float brightSampleLumaBias = (log2BaseRootOfStart + static_cast<float>(CascadeCount - 1u)) / rcpLog2Base; | ||
| float32_t2 packLogs = float32_t2(baseRootOfStart, rcpLog2Base); | ||
| float32_t2 packPrecomputed = float32_t2(log2BaseRootOfStart, brightSampleLumaBias); | ||
| rwmcPushConstants.splattingParameters.PackedBaseRootAndRcpLog2Base = hlsl::packHalf2x16(packLogs); | ||
| rwmcPushConstants.splattingParameters.PackedLog2BaseRootAndBrightSampleLumaBias = hlsl::packHalf2x16(packPrecomputed); |
Member
Author
There was a problem hiding this comment.
why isn't this a nice HLSL create of the packed splatting parameters?
Contributor
There was a problem hiding this comment.
It was before merging rwmc fix. Seems I'll have to change it back.
…ate so can make lights static const array members
…(12 bitfield) with invalid id
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@keptsecret after you merge
masteragain, you'll probably have the UI mess up and show changed from the merge commit, so close and reopen againTODO