Thanks for the help!
I understood a few things in the raytracing code. I added the
- remote dimming
-use of soil texture
-the size and alpha of the ball shadow
- the spheres can be colored
The code is small, but there is a lot of calculation going on. Calculating the color of 1 pixel is a lot of operations. As a matter of fact, I'm amazed at the performance of the smartphone, because I was expecting a much lower performance.
I added that using 'thread' the rendering takes place on several threads. When each thread is finished, draw it. I got about three times the speed. The number of processing threads can be set from 1 to 10.
It can be stated how much 'light reflection' the 'light-absorbing' rays can perform. (you are standing between two parallel mirrors, the number of light reflections is infinite). It can be limited here. 5 is good. More than that is pointless. But more than 5 is not enough, because the picture will be incomplete.
All rendering-related settings can be adjusted in real time. I would like to receive feedback on what phone/tablet (when it was released, what type) and with what settings it runs enjoyably.
My questions:
-is there a more effective 'thread'-starting option? I feel that 'thread' does not fully utilize the performance of the phone's 8-core processor (2 fast, 6 slow).
-OpenGL! Currently, the program uses 'bitmapcreator's' pixel drawing. I think it's basically the fastest pixel drawing engine out there, but it's slow for this task. If I eliminate all 'bitmapcreator' operations in the program, I achieve about 130% speed. Direct byte-buffer drawing is possible in OpenGL. (FBO drawing). Draws the contents of an array asynchronously, in a direct hardware connection. Unfortunately, running it generates an error. I don't understand why. I'm looking for someone who has used this OpenGL feature before and can help.
If the image quality could be improved, a simpler game could be built on it. If nothing else, it's good for phone speed testing.