Skip to content

Commit

Permalink
fix missing lightmap in raytraced reflection
Browse files Browse the repository at this point in the history
  • Loading branch information
turanszkij committed Jan 20, 2024
1 parent 95aa824 commit ba1f8d9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion WickedEngine/shaders/rtreflectionCS.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,14 @@ void main(uint2 DTid : SV_DispatchThreadID)
surface.V = -q.WorldRayDirection();
surface.update();

if ((surface.flags & SURFACE_FLAG_GI_APPLIED) == 0)
{
float3 ambient = GetAmbient(surface.N);
surface.gi = lerp(ambient, ambient * surface.sss.rgb, saturate(surface.sss.a));
}

Lighting lighting;
lighting.create(0, 0, GetAmbient(surface.N), 0);
lighting.create(0, 0, surface.gi, 0);

[loop]
for (uint iterator = 0; iterator < GetFrame().lightarray_count; iterator++)
Expand Down
2 changes: 1 addition & 1 deletion WickedEngine/wiVersion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace wi::version
// minor features, major updates, breaking compatibility changes
const int minor = 71;
// minor bug fixes, alterations, refactors, updates
const int revision = 361;
const int revision = 362;

const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);

Expand Down

0 comments on commit ba1f8d9

Please sign in to comment.