Skip to content

Commit b9b5d79

Browse files
the
1 parent a06e422 commit b9b5d79

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Resources/Shaders/Internal/light_shared.swsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ void fragment()
6969
newUV += vec2(0.5, 0.5);
7070
//newUV += (lightCenter - eyeCenter) / vec2(21, 15);
7171
highp vec4 origSample = texture2D(normalMap, newUV);
72-
highp vec4 normalSample = origSample * vec4(2,2,1,1) - vec4(1,1,0,0);
72+
highp vec4 normalSample = origSample * vec4(2,2,1,1) - vec4(0.441, 0.441, 0, 0);
7373
highp float run = 1;
7474
if (origSample.xyzw != vec4(0,0,0,1))
7575
{
76-
run = dot(lightDir, -normalSample.xy);
77-
if (run < 0)
76+
run = -dot(lightDir, normalSample.xy);
77+
if (run <= 0)
7878
run = 0;
79-
run += normalSample.z;
79+
run += normalSample.z * sqrt(normalize(vec3(diff, LIGHTING_HEIGHT)).z);
8080
if (run <= 0)
8181
discard;
8282
}

Robust.Client/Graphics/Clyde/Clyde.HLR.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ private void RenderViewport(Viewport viewport)
521521
using (DebugGroup("Entities"))
522522
using (_prof.Group("Entities"))
523523
{
524-
DrawEntities(viewport, worldBounds, worldAABB, eye, normal: true);
524+
DrawEntities(viewport, worldBounds, worldAABB, eye, false);
525525
}
526526

527527
using (_prof.Group("Overlays WSBFOV"))

Robust.Client/Graphics/Clyde/Clyde.LightRendering.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ private void DrawLightsAndFov(Viewport viewport, Box2Rotated worldBounds, Box2 w
494494
lightShader.SetUniformMaybe("globalRotation", (float)eye.Rotation.Theta - (float)rotation.Theta -
495495
(float)_transformSystem.GetWorldRotation(mapUid).Theta);
496496
lightShader.SetUniformMaybe("eyeZoom", eye.Zoom);
497-
lightShader.SetUniformMaybe("eyeCenter", eye.Position.Position - eye.Offset);
497+
lightShader.SetUniformMaybe("eyeCenter", eye.Position.Position);
498498

499499
var offset = new Vector2(component.Radius, component.Radius);
500500

0 commit comments

Comments
 (0)