3DreamEngine
3DreamEngine copied to clipboard
Android support?
Is this supposed to run on Android or is any support planned? After running the Lamborghini example I got:
Error
3DreamEngine/init.lua:190: The rgba16f canvas format is not supported by your graphics drivers.
Traceback
[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'newCanvas'
3DreamEngine/init.lua:190: in function 'newCanvasSet'
3DreamEngine/init.lua:244: in function 'resize'
3DreamEngine/init.lua:264: in function 'init'
examples/Lamborghini/main.lua:7: in main chunk
[C]: in function 'require'
main.lua:96: in function 'draw'
run.lua:34: in function <run.lua:10>
[C]: in function 'xpcall'
Will be called automatically in the future, but for now try dream.renderSet:setMode("direct")
. That will disable postprocessing, which won't perform well on mobile anyways.
I finally got the example running. I had to do go through more errors.
In the end I had to call a few more functions:
dream.renderSet:setMode("direct")
dream.mirrorSet:setMode("direct")
dream:setSkyReflectionFormat(256, "normal", false)
The last one was coming from line 74 in 3DreamEngine/jobs/sunShadow.lua
where format is specified as:
format = light.shadow.dynamic and "rg16f" or "r16f"
I tried disabling the shadow's dynamic at first sun.shadow:setDynamic(false)
but both of those formats are unsupported and there's no way to change that from the public API so I had to patch that line to specify format = "normal"
Then it finally ran, I also added a simple FPS display and I see that I'm getting around 22 FPS but for this particular example it's smooth.
Overall my conclusion is that this probably needs a lot of work to be mobile-ready, specially since that canvas format thing is spread all over the code, and then I'm not sure what the performance will be like for real projects.