06-11-2023, 01:27 AM
(This post was last modified: 06-11-2023, 01:27 AM by Kain Nobel.)
I think the code is wrong. For the tone value operation, I think you'd need to employ a "min / max" array function or use modulous to cut the number to it's proper negative or positive value. What exactly are you trying to do? Can the "sprite.color = some_color" help achieve the results you're looking for? Changing hue? Changing tone? What are you trying to speed up?
I'll have to come back and give a proper response when I have time because we're kinda facing the same challenge with hue change operations, albeit in different arenas. Busy, busy, busy ;_;
First off; I suggest benchmarking to see if fill_rect is faster than set_pixel for a single pixel operation. I could be wrong but I think it is, oddly enough.
Second: Using shaders is probably the fastest way to support this operation, unless you can utilize the RGSS Core engine to do it. I believe you should be able to do it with RGSS. Internally, I doubt it iterates with a "for X / Y" block, I think it's all handled as a "pass through" operation using shaders. Same goes for Tone, Angle, Zoom, the operations of a Plane, etc.
From what I understand, RMXP uses the Direct X standard. I believe it probably utilizes a primitive OpenGL standard too, and all operations are Shader operations, but I could be wrong or misunderstanding with how RMXP really works. Based on my limited understanding of the black box known as the RMXP hidden classes, plus what I've been doing with the RGL Core, I'm probably more right than wrong. I welcome any corrections because I like to know and understand these things better than I currently do, I hate speculating on such a topic.
I'll have to come back and give a proper response when I have time because we're kinda facing the same challenge with hue change operations, albeit in different arenas. Busy, busy, busy ;_;
First off; I suggest benchmarking to see if fill_rect is faster than set_pixel for a single pixel operation. I could be wrong but I think it is, oddly enough.
Second: Using shaders is probably the fastest way to support this operation, unless you can utilize the RGSS Core engine to do it. I believe you should be able to do it with RGSS. Internally, I doubt it iterates with a "for X / Y" block, I think it's all handled as a "pass through" operation using shaders. Same goes for Tone, Angle, Zoom, the operations of a Plane, etc.
From what I understand, RMXP uses the Direct X standard. I believe it probably utilizes a primitive OpenGL standard too, and all operations are Shader operations, but I could be wrong or misunderstanding with how RMXP really works. Based on my limited understanding of the black box known as the RMXP hidden classes, plus what I've been doing with the RGL Core, I'm probably more right than wrong. I welcome any corrections because I like to know and understand these things better than I currently do, I hate speculating on such a topic.