Skip to content

Commit

Permalink
Traktor: Clamp depth factor in Ocean shader.
Browse files Browse the repository at this point in the history
  • Loading branch information
apistol78 committed May 27, 2024
1 parent 40364e2 commit 06f97e2
Showing 1 changed file with 42 additions and 21 deletions.
63 changes: 42 additions & 21 deletions data/Source/System/Terrain/Ocean/Shaders/Ocean.xdi
Original file line number Diff line number Diff line change
Expand Up @@ -1378,7 +1378,7 @@ Read current fragment
<script>
<![CDATA[
const vec3 scatter = ComputeOceanScattering(
$HeightDisplacement.x,
$HeightDisplacement.x * 200.0f,
$ViewDirection.xyz,
$ViewNormal.xyz,
$ViewLightDirection.xyz,
Expand All @@ -1388,6 +1388,7 @@ const vec3 scatter = ComputeOceanScattering(
$SpecularCoeff.xyz
);
$Output = vec4(scatter, 0.0f);
]]>
</script>
</item>
Expand Down Expand Up @@ -1702,6 +1703,16 @@ $Output = vec4(scatter, 0.0f);
</position>
<value>0.5</value>
</item>
<item type="traktor.render.Clamp" version="traktor.render.Node:1">
<id>{084AE3F8-F9FA-4DD5-9519-9004E9F4B793}</id>
<comment/>
<position>
<first>-389</first>
<second>1503</second>
</position>
<min>0</min>
<max>1</max>
</item>
</nodes>
<edges>
<item type="traktor.render.Edge" version="1">
Expand Down Expand Up @@ -1964,16 +1975,6 @@ $Output = vec4(scatter, 0.0f);
<id>{1CD3B29D-693D-4635-B49F-EF53300CAA8A}</id>
</destination>
</item>
<item type="traktor.render.Edge" version="1">
<source>
<node ref="/object/nodes/item[36]"/>
<id>{D833DB7F-13CB-42D8-8135-48F35EB1288B}</id>
</source>
<destination>
<node ref="/object/nodes/item[34]"/>
<id>{11585EBC-914D-4E6D-A10D-D01694FF9840}</id>
</destination>
</item>
<item type="traktor.render.Edge" version="1">
<source>
<node ref="/object/nodes/item[37]"/>
Expand All @@ -1994,16 +1995,6 @@ $Output = vec4(scatter, 0.0f);
<id>{D2D716D6-C4A1-471F-894A-D718515F6281}</id>
</destination>
</item>
<item type="traktor.render.Edge" version="1">
<source>
<node ref="/object/nodes/item[41]"/>
<id>{9E839249-E9B9-4736-8BDD-A95A1C892B42}</id>
</source>
<destination>
<node ref="/object/nodes/item[42]"/>
<id>{9BA81525-6E53-498C-AA97-B31FB48F3A50}</id>
</destination>
</item>
<item type="traktor.render.Edge" version="1">
<source>
<node ref="/object/nodes/item[43]"/>
Expand Down Expand Up @@ -3064,6 +3055,36 @@ $Output = vec4(scatter, 0.0f);
<id>{69997292-C813-490C-910C-620B9AD3A2BB}</id>
</destination>
</item>
<item type="traktor.render.Edge" version="1">
<source>
<node ref="/object/nodes/item[33]"/>
<id>{2D90AB77-694C-4586-AA05-5CF062EFFFAB}</id>
</source>
<destination>
<node ref="/object/nodes/item[149]"/>
<id>{9BA81525-6E53-498C-AA97-B31FB48F3A50}</id>
</destination>
</item>
<item type="traktor.render.Edge" version="1">
<source>
<node ref="/object/nodes/item[149]"/>
<id>{8F2140B5-F4E2-4E8F-8121-13C980250D3C}</id>
</source>
<destination>
<node ref="/object/nodes/item[34]"/>
<id>{11585EBC-914D-4E6D-A10D-D01694FF9840}</id>
</destination>
</item>
<item type="traktor.render.Edge" version="1">
<source>
<node ref="/object/nodes/item[35]"/>
<id>{84BF3C26-64A7-4032-B775-1D369052B243}</id>
</source>
<destination>
<node ref="/object/nodes/item[42]"/>
<id>{9BA81525-6E53-498C-AA97-B31FB48F3A50}</id>
</destination>
</item>
</edges>
<groups>
<item type="traktor.render.Group">
Expand Down

0 comments on commit 06f97e2

Please sign in to comment.