|
Post by Sam H on Jun 12, 2017 13:07:06 GMT
Could you add access to shaders within the Nitro Graphics library? This would help to make fantastic programs. I can't seem to find any way to emulate shaders in TouchLua, and even if I did, the optimization loss would be awful. Thanks!
|
|
|
Post by Sam H on Nov 5, 2017 4:00:22 GMT
I suppose the Nitro graphics library is using a method other than OpenGL to draw primitives, as the graphics screen is virtually identical to the draw library's graphics screen, but images are drawn with OpenGL, according to the maker of TouchLua and the fact that the images don't contain as much pixelization as everything else.This means that an "OpenGL shader" would not be wise, as the program mainly doesn't use OpenGL.
Therefore, I propose that a new method be introduced to the nitro graphics library (or two):
graphics.setvertexshader(func shader) Receives a function which will receive a vertex, and return a vertex of the same type. Example: --Increase contrast: local t = 2 graphics.setvertexshader(function(v) local pos = v.pos local color = v.color return { pos = pos, color = {color[1]^t, color[2]^t, color[3]^t, color[4] } end)
|
|
|
Post by Admin on Dec 3, 2017 14:21:58 GMT
Nitro Graphics Library uses OpenGL to draw all type of objects including primitives.
|
|