Shadows appear to be "broken"

Heya Everyone!!

I found a lighting system made by @Razorboots which simulates 2000’s Shadow Volumes used in games like DOOM III which is perfect for me trying to replicate 2010 ROBLOX. The issue is that, for some reason, the shadows appear like this.

I don’t know why this is happening as I expected it I set it up correctly. Here’s the code I got from the GitHub implementation tutorial.

local Modules = script.Parent.Modules
local Shadows = require(Modules.Shadow)

Shadows.setPartProperty(workspace.Baseplate, "isShadowCanvasTop", true)

Shadows.setPartProperty(workspace.wall, "isShadowCanvasAll", true)
Shadows.setPartProperty(workspace.wall, "isShadowOccluder", true)
--[[
Shadows.setModelProperty(workspace.Props, "isShadowCanvasAll", true)
Shadows.setModelProperty(workspace.Props, "isShadowOccluder", true)
]]

Shadows.getAllLightSources(workspace)


local RootManiFolds = Shadows.getRootManifolds()
Shadows.createAllShadowMeshes(RootManiFolds)



game:GetService("RunService").Heartbeat:Connect(function()
	Shadows.updateAllLightSources()
	RootManiFolds = Shadows.updateRootManifolds(RootManiFolds)
end)

GITHUB PAGE: GitHub - Razorboot/luau-2016-shadow-engine

1 Like

I’ll be bumping this since I found something.

Apparently, the position of the sun seems to affect the shadows as setting the GeographicLaitude to 90 seems to somewhat reduce the severity of the shadow being “broken”.

This is actually weird since there is actually a test place for the system I haven’t mentioned yet since inside of the test place, the light actually casts the light instead of the sun.


Nevermind, apparently the default baseplate was causing it to break for whatever reason. Making a new baseplate (256x256) seems to fixed it. (There’s actually a small, thin line if you look close enough in the screenshot, but its to the point where nobody will notice it.)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.