bugfix for a bugfix :)
Fix a bug noticed by Rohan M.
Completely kick out the android.opengl.Matrix dependency from the library.
Implement the android.opengl.Matrix functions ourselves.
Decouple (to a large degree) the OpenGL Library from Android.
Major change in JSOn file format:
replace the old (corners,centers) system with a list of VertexEffects which are applied to each cubit variant.
Improve the Sink effect so that at extreme strengths (close to 0 and infinity) it inflates and deflates more.Reason: previous version failed to fully inflate the Masterball to a nice sphere.
license
Very important bugfix in the Library: MatrixEffectQuaternion cannot share the tmp static buffers!
Extra API for QuatHelper.
Add DistortedProgram.stopUsingProgram()
By default, do use Halo Depth (this broke the halo around a solved object in distorted-cube!)
Set possibility for the Postprocessing effects to eclipse the whole object or only work at the edges.
comment.
New BORDER effect.
Comment.
Improvements for the new Border effect. Now works, but covers the object - to be corrected.
New postprocess effect 'Border' (not working yet) and adding it to the testing app 'Triblur'.
Move destroying most of statics from onDestroy() earlier, to onPause().
Reason: doing this in onDestroy() is too late, because when we have two activities, and switch between them, first the ending's Activity onPause() is called, then the starting Activity's onResume, then it's onSurfaceCreated(), then we insert all the effects, and only then the ending Activity onDestroy() gets fired off - and this might destroy the already enabled effects, like for example the Programs of the Postprocessing effects.
Copy constructors for the Statics.
Move the information when was a EffectQueue last time evaluated from the EffectQueues all the way up to the Node which contains them.The point: we need to reset this time back to 0 every time we attach the Node (and thus start evaluating the Queues inside)
Workaround for the fact that one some devices (for example the LG K30's V@415 driver on the Adreno 308) the Glow halo wasn't visible.
MeshBase's 'MAX_NUM_COMPONENTS' is not a constant - rename!
Bugfixes as a result of the Samsung Galaxy J4+ investigation:
1) By default, switch off transform feedback in the main program. Create a new API 'needTransformFeedback()' to call if someone still needs TF in the main program.2) lower the default max number of vertex effects to 30....
Remove UBO from the fragment shader and come back to the default of only 5 concurrent fragment effects. All because UBOs in fragment shader crash on Adreno 510 and Adreno 506.
Introduce another Uniform Block Object. Now we can have much more vertex and fragment effects - up their default number to 100.
Convert the Integer part (i.e. effect names and the two associations) of vertex and fragment shaders to Uniform Buffer Objects.Next: convert the last part, i.e. the float effect parameters.
Bugfix: always normalize the normal vector after modifying it, otherwise the next effect might not work correctly (Distort!)
Put new things to the StackFrame.
Fix the fact that the static DistortedEffects.mAllQueues was global, shared between all Activities.Completely replace this mechanism with a non-static list of links from a VertexEffect to all VertexEffectQueues this effect is a member of.
Comments.
Remove the 'inflate' vertex attributs from the Mesh and file format, and replace that with a per-component 'inflate centers' (which are as of yet untested)
Speedup: remember the mesh associations of VertexEffects only once, when they actually change, and not every time we compute() a VertexQueue.
Turn the vName, vEffAnd and vEffEqu integer array uniforms into a one ivec4.The point: ivec4s are always packed tightly in UBOs (which is going to be the next step)
Introducing UBO to Effect Queues: step 1.
New effect VertexEffectDisappear
Fix normals in case of MatrixEffectScale / Shear.Fix displaying the normal vector.
Fix modifications of normals in VertexEffectScale and VertexEffectShear.
When blurring or glowing, we need to CLAMP_TO_EDGE the texture - otherwise part of the blur or glow could appear on the other end of the texture.
Fix the fact that Distort was rotating normals outside of its region!
Fixes for pausing and restarting.
Update Myanmar flag.
Progress making it possible to apply Vertex Effects only to some Components of a Mesh.
1) Cube: convert it to the latest library. Main difference: objects are rendered better, individual cubits have rounded corners.2) Examples: some adjustments to MeshJoin & Predeform3) Library: fix a bug in main_vertex_shader's 'degree' function, which didn't work proprely in case of a vertex which was exactly at the center (i.e. vector PS was zero)
Fix VertexEffectRotate.'MeshJoin' app now back it its functionality from 'master'
Change 'tag' to a more appropriate name - 'association'.
Introduce 'tags' (soon to be renamed to 'associations') to Mesh and VertexEffect.A 'tag' is a way to associate a Vertex Effect only to a subgroup of a given Mesh's vertices (more precisely, only to an arbitrary subset of its Components)
Have VERTEX_QUATERNION, VERTEX_ROTATE and VERTEX_SHEAR modify inflate vectors.Split Vertex attribute array into two (the one modified by preapply effects and the one not)
First attempt at the MeshBase.apply(VertexEffect) API.
Change the Postprocessing effects: separate the radius and the halo.Reason: we needed a way to specify the size of the halo around a postprocessed object; before it was automatically (and not very correctly) computed from the radius - before we knew the size of the object's bounding box, so this automatic computation was possible. Now we're removing the MashBase.getBounding(0 API, so the size of the halo has to be explicitly given by the user. This way is more correct anyway and gives the user more control (as the Multiblur app proves!)...
A lot of changes.
1) main vertex shader: remove support for degree_object. This functionality will hopefully come back when we introduce other than circular regions.2) MeshBase: remove the need to set a Bounding box (this is the point of the whole thing - we wanted to get rid of this so that the advances in MeshJoined will be easier)...
new VertexEffectShear
new VertexEffectScale
bugfix for VertexEffectRotate
new VertexEffectRotate
Add the first two VERTEX 'pseudo-matrix' effects: VERTEX_MOVE & VERTEX_QUATERNION i.e. implementations of those two MATRIX effects in VERTEX queue.
The point(s):
1) preparation for the upcoming MeshBase.preApply(VertexEffect effect) API that's going to supersede the current much more limited MeshBase.apply(MatrixEffect effect)...
Lower requirements - now only OpenGL ES 3.0 is required; if running on such platform, OIT part of the API ( which is the only one which actually requires 3.1) is switched off.
Further corrections.
Port Listener to the new setStretch-less API.
Move the 'pre-multiply mesh before applying any effects' thing from [(Xsize of texture, Ysize of texture) x Mesh's zFactor] to Effects.setStretch(sx,sy,sz)
New API MeshBase.apply(MatrixEffect[])
Making the Dialogs more consistent.
fix a bug: in certain places when we use reflection, it needs to be getDeclaredMethod and not getMethod because the methods are not public!
Simplify the way applications can get notifications when an effect finishes.
Now, instead of the 'DistortedEffects.(de)registerForNotifications()' 2 APIs, we call a single 'Effect.notifyWhenFinished()'.
Correct the Legal notice.
Rename all the classes that are not exported to application to 'Internal'
Add correct normal vectors to the PINCH effect. The effect is now fully 3D.
Make the 'PINCH' effect fully 3D (define its acting line in terms of (latitude,longitude) angle pair).
Still, something is not fully working in the Earth app with the effect - investigate.
Add (simplified, approximated) shading to the Sink effect, i.e. move the normal vectors.
Remove unused imports.
Finish the Rubik app.
Refactor the 'Generic' app.
Bugfix: default, MAX region cannot be of Float.MAX_VALUE radius - then in the shader we can have an overflow. Make it 1000000 in radius.
Some improvements to the Wind app - still does not look very realistic though :(
Correct Distort.
Make Distort truly 3D.
Massive: make the coordinate system agree with that of OpenGL (i.e. invert the Y axis).
Make the Sink effect fully 3D.
Correct the z-axis of the center of fragment effects (it was inverted)
Progress with the Earth app.
Make the Fragment effects truly 3D: change their 4D 'region' into a 3D 'center' (a point in 3D) and 3D 'region' (which is now a set of 3 radii defining an ellipsoid around the center)
Also corresponding changes to the applications.
Further fixes for the new fully 3D vertex region.
Redefine the Vertex Region from (x,y,r,unused) to (x,y,z,r). This takes into account the 'Z', which makes it possible to warp only one side of a 3D Mesh like Sphere.
Also corresponding changes in applications.
Make Matrix effects Rotate and Quaternion actually correct when it comes to the Z-axis. Also corresponding adjustments in apps.
Minor cleanups.
Properly clean up static varaibles in the Effect classes!
Improve computation of the thickness of the postprocessing halo - should be independent of the size of underlying object now.Still it is not completely ok, it appears to depend on the ModelView matrix (use the Effects3D app to rotate the object around Z-axis to see this)
Make the Effects3D app a bit more user-friendly.
More progress with Effects3D app.
Progress with thr Glow effect - moving glow app looks ok now.
More progress with a more generic 'preprocess' stage of Postprocessing Effects.
Hide the FBO_QUEUE thing inside the library. The queue is running internally now, without public setAsOutputFBO() thing (simplifies writing postprocess effects)
Partially 'fix' Glow effect for the case when FBO_QUEUE_SIZE > 1 (come back to pre-FBO_QUEUE_SIZE level of functionality).Still, Glow needs to actually get implemented correctly.
Simplify Main OIT shader.
Standarize GLSL version across the whole library.
I spoke too soon, the ARM Mali flashing is of course not fixed yet. The previous commit fixed Triblur, but the bug is still reproducible elsewhere (only in the 'postprocessed' apps though).
This commit introduces a circular queue in case of the postprocessing FBOs - with little success though.
Port all the 'non-controversial' changes from order-independent-transparency branch.
Disable blending during postprocessing.
Fix for bug #28: looks of the borders of a blurred object depend on if the object is the first in the postprocessing bucket.
Postprocessing buffers mBuffer[] are now shared among all postprocessing operations. This saves a lot of memory, but also means that when doing each particular postprocessing, the textures backing up the mBuffer might be too large. We need to fix two things here: when outputting to those too large textures, we need to adjust the Viewport, and when binding those too large textures as input - we need to adjust the TexCoords to compensate....