Skip to content

Commit

Permalink
Traktor: RTWorldOverlay calculate trivial lambert shading.
Browse files Browse the repository at this point in the history
  • Loading branch information
apistol78 committed Nov 21, 2024
1 parent 302cfd7 commit 09d782f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions data/Source/System/World/Overlay/Shaders/RTWorldOverlay.xdi
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@
<id>{BC7D2173-F3FF-E44F-836B-098322F69726}</id>
<comment/>
<position>
<first>550</first>
<second>-210</second>
<first>549</first>
<second>-209</second>
</position>
<name>Raytracing</name>
<technique/>
Expand Down Expand Up @@ -150,7 +150,9 @@ $Output = vec4(0.0f, 0.0f, 0.0f, 1.0f);
if(rayQueryGetIntersectionTypeEXT(rayQuery, true) != gl_RayQueryCommittedIntersectionNoneEXT )
{
const HWRT_Material material = HWRT_GetMaterial(rayQuery);
$Output = material.albedo;
const vec3 lightDirection = vec3(0.0f, 1.0f, 0.0f);
const float phi = clamp(dot(lightDirection, material.normal.xyz), 0.0f, 1.0f);
$Output = vec4(phi * 0.5f + 0.5f) * material.albedo;
}
]]>
Expand Down

0 comments on commit 09d782f

Please sign in to comment.