Alienhead Posted January 21 Posted January 21 Error, missing or something. Pretty much need this command to setup any-type of interface for the user or whatever.. Quote Alienhead Components and Software
Josh Posted January 21 Posted January 21 SetShadowmapSize will work. l = CreatePointLight(nil) l:SetShadowmapSize(512) 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Alienhead Posted January 22 Author Posted January 22 I dont think this command is preforming it's duties.. I can set it to : SetShadowmapSize(0) or I can set it to : SetShadowmapSize(2048) And get the same results. Does this work on DirectionalLights? If not where is the SetShadowQuality() command? Theres got to be some way to control the overall Qulity in code>? The editors Shadow Quality setting DOES NOT carry over to map/scene files. Quote Alienhead Components and Software
Josh Posted January 22 Posted January 22 Shadow quality is a per-world multiplier that adjusts the resolution of each shadow map. Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Solution Josh Posted January 23 Solution Posted January 23 World:SetShadowQuality was not exposed to Lua. I apologize for this oversight and I am adding it now. Here is an example showing the Light:SetShadowmapSize in action: --Get the displays local displays = GetDisplays() --Create a window local window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[1], WINDOW_CENTER | WINDOW_TITLEBAR) --Create a framebuffer local framebuffer = CreateFramebuffer(window) --Create a world local world = CreateWorld() --Create a camera local camera = CreateCamera(world) camera:SetClearColor(0.125) camera:SetFov(70) camera:Move(1, 1, 3) camera:Turn(90,0,0) --Create light local light = CreateSpotLight(world) light:SetPosition(0,1,0) light:SetColor(2) light:SetRange(0.01,20) local box = CreateBox(world) box:SetPosition(0,0.5,2) --Create ground local ground = CreateBox(world, 20, 1, 20) ground:SetPosition(0, -0.5, 0) ground:SetColor(0, 1, 0) q = 1 --Main loop while window:Closed() == false and window:KeyHit(KEY_ESCAPE) == false do if window:KeyHit(KEY_UP) then q = q + 1 end if window:KeyHit(KEY_DOWN) then q = q + 1 end if window:KeyHit(KEY_SPACE) then light:SetShadowmapSize(64) end --world:SetShadowQuality(q) world:Update() world:Render(framebuffer) end 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.