This is really tripping me out. I have a software renderer that basically creates a lot of frames at the beginning of my program but that’s it, it just puts them into an array and it doesn’t talk to anyone else but the client. All scripts are on the client, this is completely clientside. I found out that the difference over like 3 tests was only about half a second at 200x200 resolution (which takes about 15 seconds to run regardless). Is this like some neat caveat with it or something?
local i =0
local start = os.clock()
for x=0,width-1 do
backbuffer[x] = {}
zbuffer[x] = {}
for y=0,height-1 do
i += 1
if i % 1000 == 0 then
game:GetService("RunService").Heartbeat:Wait()
end
local pixel = Instance.new("Frame", script.Parent.Canvas)
pixel.BorderSizePixel = 0
pixel.BackgroundColor3 = Color3.new()
pixel.Position = UDim2.fromScale((width-x)/width,y/height)
pixel.Size = UDim2.fromScale(1/width, 1/height)
backbuffer[x][y] = {texture:sample(Vector2.new(x/width,y/height)), pixel}
zbuffer[x][y] = -math.huge
end
end
print(os.clock() - start)