Project

General

Profile

Download (6.81 KB) Statistics
| Branch: | Revision:

library / src / main / res / raw / main_vertex_shader.glsl @ 073e5a7a

# Date Author Comment
073e5a7a 03/12/2021 10:33 PM Leszek Koltunski

Another attempt at fixing tthings on early Qualcomm OpenGL ES 3.0 drivers.

The previous version does not work on Adreno 405 driver V@100, present for example in a Asus ZenPad 8.
Revert the packed 'ivec2' UBO in the vertex shader back to a 'std140' ivec4. This comes at a price if bumping into the bug on Qualcomm driver version 331 on Adreno 308 - i.e. Samsung Galaxy J4+ again....

80961fc1 02/24/2021 11:12 PM Leszek Koltunski

Make the 'Component Associations' UBO (on most devices) twice smaller -
use the 'packed' layout and 'ivec2' in place of 'ivec4'.

This forces us to dynamically probe the 'Stride' - number of 4-byte entities that the UBO's 'ivec4' takes - and correct the already-constructed UniformBlockAssociation objects in case this turns out to be different than the expected 2, i.e. tightly-packed....

46d463a4 02/24/2021 09:40 AM Leszek Koltunski

Make per-component centers optional, controlled by API MeshBase.setUseCenters()

de77a6c5 01/09/2021 11:49 PM Leszek Koltunski

Introduce another Uniform Block Object. Now we can have much more vertex and fragment effects - up their default number to 100.

78ff6ea9 01/07/2021 04:08 PM Leszek Koltunski

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.

9f9924f8 08/26/2020 03:36 PM Leszek Koltunski

Remove the 'binding' parameter from the UBO in the vertex shader - this is not part of OpenGL ES 3.0, only introduced in 3.1, and we want to be compatible with 3.0.
Now we need to dynamically detect the UBO index and form a BlockBinding ourselves.

45d530fc 08/25/2020 05:48 PM Leszek Koltunski

Update all the dmeshes to versions 2. Add the Dino dmesh.

a2878a67 08/25/2020 04:39 PM Leszek Koltunski

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)

24804c15 08/23/2020 12:00 PM Leszek Koltunski

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)

41b3ada0 08/23/2020 11:25 AM Leszek Koltunski

Simplify AssociationUniformBlock

53873b84 08/21/2020 10:38 AM Leszek Koltunski

Bugfix.

96e3b88a 08/20/2020 11:29 PM Leszek Koltunski

Introducing UBO to Effect Queues: step 1.

0bd9f644 08/19/2020 01:31 PM Leszek Koltunski

Introduce an UBO to the vertex shader holding info about mesh effect associations.

62c869ad 08/06/2020 11:50 PM Leszek Koltunski

Fix normals in case of MatrixEffectScale / Shear.
Fix displaying the normal vector.

2aeb75aa 06/03/2020 08:25 PM Leszek Koltunski

Update Myanmar flag.

36d65d88 05/29/2020 03:48 PM Leszek Koltunski

Progress making it possible to apply Vertex Effects only to some Components of a Mesh.

1e667536 05/26/2020 12:53 PM Leszek Koltunski

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 & Predeform
3) 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)

1e672c1d 05/23/2020 12:50 PM Leszek Koltunski

Change 'tag' to a more appropriate name - 'association'.

bc208a9c 05/23/2020 10:30 AM Leszek Koltunski

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)

535a45bc 05/21/2020 11:32 AM Leszek Koltunski

Fix licenses :)

e54bfada 05/20/2020 02:43 PM Leszek Koltunski

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)

667884b0 05/19/2020 08:01 PM Leszek Koltunski

Speedup for preapply

f046b159 05/16/2020 07:54 PM Leszek Koltunski

First attempt at the MeshBase.apply(VertexEffect) API.

277eddbb 05/08/2020 11:03 PM Leszek Koltunski

Remove the MeshBase.{set/get}Stretch API altogether.

0f10a0b6 05/03/2020 11:26 PM Leszek Koltunski

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)...

e979d285 04/25/2020 12:18 AM Leszek Koltunski

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)...

b35570ad 03/04/2020 10:54 PM Leszek Koltunski

Minor.
Looks like MeshBase.join() actually works.

23b733db 03/03/2020 10:31 PM Leszek Koltunski

Further corrections.

7602a827 05/02/2019 10:41 PM Leszek Koltunski

Rename all the classes that are not exported to application to 'Internal'

50be8733 01/12/2019 04:24 PM Leszek Koltunski

Correct Distort.

353f7580 01/11/2019 11:15 PM Leszek Koltunski

Make Distort truly 3D.

4aa38649 12/30/2018 01:37 AM Leszek Koltunski

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.

e71dd7fb 12/11/2018 01:04 PM Leszek Koltunski

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)

a16bf106 12/10/2018 01:39 PM Leszek Koltunski

Make the Effects3D app a bit more user-friendly.

7a5e538a 11/30/2018 02:28 PM Leszek Koltunski

Progress with Inflate (building block of postprocessing effects: the proper way of marking a halo around a Mesh)
'Inflate' app testing the machanism. MeshFlat appears to be working, now we only need to fill up the per-vertex Inflate vector in the MeshCubes.

6f2d931d 11/26/2018 10:31 PM Leszek Koltunski

Added a new attribute to vertices of a MeshBase object: the vec3 'inflate' vector.
This vector describes the direction where the vertex needs to be moved when we 'inflate' the whole mesh.
If the mesh is locally smooth, this is simply the normal vector; otherwise (for example in the corners of the MeshCubes) - not....

ca4521e3 07/05/2018 10:33 PM Leszek Koltunski

Simplify Main OIT shader.

c1a38ba3 07/01/2018 11:21 PM Leszek Koltunski

Progress with non-postprocessed OIT.

Status: compiles, but fails to work on both Adreno and Mali. Crashes the app (Adreno) or the whole system (Mali)

5e331bc8 07/01/2018 10:07 PM Leszek Koltunski

Update the 'main' shaders for OIT.

341151fc 04/27/2018 04:53 PM Leszek Koltunski

Fixes ported from the 'OIT' branch:

- remove counting of transparent pixels
- various fixes for the Mali GPU

7cd24173 06/20/2017 11:51 PM Leszek Koltunski

Move all the knowledge about Vertex and Fragment effects to their respective classes.

15aa7d94 06/08/2017 01:53 PM Leszek Koltunski

Progress with support for Effect classes.

3fc9327a 05/11/2017 03:47 PM Leszek Koltunski

Use Transform Feedback to (optionally) display the Normal vectors.

604b2899 05/10/2017 12:56 PM Leszek Koltunski

Dynamic display of bounding rectangles (with coords computed by Vertex Shader and gotten with Transform Feedback) works now.

Major problem: the glMapBufferRange() slows doewn rendering in a major way. Multiblur's FPS:

Nexus5X : 35.4 before -> 12.6 after...

f80337b5 05/09/2017 09:30 AM Leszek Koltunski

Revert "Some progress with Transform Feedback. Still many bugs all over."

This reverts commit 79921db22e4ff5a3b2e6e3466a39445f5607a695.

79921db2 05/05/2017 11:30 PM Leszek Koltunski

Some progress with Transform Feedback. Still many bugs all over.

6e7c8721 04/26/2017 10:08 AM Leszek Koltunski

Simplifications.

94f6d472 03/29/2017 11:05 AM Leszek Koltunski

Make it more flexible; now it can run almost all apps on OpenGL 2.0 contexts; OpenGL 3.0 ( with GLSL 3.00) required for POSTPROCESSING.

f2367b75 03/28/2017 12:26 PM Leszek Koltunski

Upgrade from GLSL 1.00 to GLSL 3.00 ES
Introduce separate BLUR1 and BLUR2 shaders, the second one marging (writing to gl_FragDepth still does not work)

ad33f883 03/01/2017 05:48 PM Leszek Koltunski

Minor

81a0b906 02/28/2017 11:51 PM Leszek Koltunski

Preparation for shader optimization

b2dc3c19 02/03/2017 09:45 PM Leszek Koltunski

Back out the last change.

5e58293a 02/02/2017 06:10 PM Leszek Koltunski

Effect-independent normals.

b2b83871 02/02/2017 05:32 PM Leszek Koltunski

Minor

a8537f43 02/02/2017 05:23 PM Leszek Koltunski

Preparation for effect-independent computation of the nermal vectors.

2e7ad49f 01/21/2017 12:25 AM Leszek Koltunski

Define float precision in Vertex Shaders to the same like in Fragment Shaders.

bfe2c61b 01/10/2017 10:27 AM Leszek Koltunski

Blurred image visible now!

b86265d6 11/24/2016 02:38 PM Leszek Koltunski

Add 3rd dimension to the Deform effect.

44efc8a8 11/24/2016 02:15 PM Leszek Koltunski

Improve the Deform app

6ebdbbf1 11/24/2016 12:58 AM Leszek Koltunski

DEFORM: add support for Regions

18d15f2f 11/23/2016 11:45 PM Leszek Koltunski

Polish up DEFORM.

dbeddd9d 11/23/2016 05:49 PM Leszek Koltunski

re-write the deform effect

3ea19d1c 11/18/2016 06:10 PM Leszek Koltunski

rearrange comments

f6cac1f6 11/18/2016 05:17 PM Leszek Koltunski

rearrange comments

82ee855a 11/14/2016 10:50 PM Leszek Koltunski

New vertex effect 'PINCH'

fa6c352d 11/14/2016 10:00 PM Leszek Koltunski

Complete moving center to 3D.

291705f6 11/03/2016 05:21 PM Leszek Koltunski

re-generate noise after passing each Point.

fe3cee39 10/21/2016 09:42 PM Leszek Koltunski

1. Workaround for th issue that my shitty Nexus 4 crashes while compiling the vertext shader (actually the wave function)
2. Improvements to the Dynamics app

ea16dc89 10/21/2016 01:44 PM Leszek Koltunski

minor stuff

350cc2f5 10/18/2016 11:19 AM Leszek Koltunski

Make the WAVE effect 5D (extra parameter 'offset')

d0c902b8 10/17/2016 03:04 PM Leszek Koltunski

swap the 2nd and the 3rd parameters in the WAVE effect and improve comments for the WAVE user API.

5b1c0f47 10/17/2016 02:12 PM Leszek Koltunski

Switch off the pre-compulting of sin and cos in CPU as it turns out that those two are single-instruction functions on any modern GPU ( http://www.gamedev.net/topic/322422-number-of-gpu-cycles-for-cos-and-sin-functions/ - link form 2005 ! )

f256e1a5 10/16/2016 10:37 PM Leszek Koltunski

Improve the comment the WAVE effect.

57297c51 10/16/2016 10:27 PM Leszek Koltunski

Correct one more issue with computation of WAVE.

c6ea3680 10/12/2016 09:50 PM Leszek Koltunski

Correct one issue with incorrect shadows in WAVE when V.z <0 .

73af5285 10/12/2016 12:29 AM Leszek Koltunski

Now we can add up the WAVE effect to others with smooth shading! Remaining issues:

- when angle A < 0, the shades are wrong
- sometimes (check with the 3D vertex & Fragment effects' app) we get black spots at seemingly random points. Looks like computational instability again.

06d71892 10/10/2016 10:15 PM Leszek Koltunski

Shades in the WAVE effect fully working, if the effect is the only one.

Remaining: combine the shades with other effects!

39b80df0 10/09/2016 10:42 PM Leszek Koltunski

Shades of the WAVE effect (almost!) working.

a7067deb 09/15/2016 09:04 PM Leszek Koltunski

small improvements in DISTORT

9ea4f88f 08/31/2016 10:39 PM Leszek Koltunski

Better normals in DISTORT

815869cb 08/30/2016 04:55 PM Leszek Koltunski

Vertex positions fully 3D now. Remaining: normals!

02ef26bc 08/30/2016 04:29 PM Leszek Koltunski

Preparation to make the WAVE effect fully 3D

6ddda212 08/29/2016 09:34 PM Leszek Koltunski

Adjustments for EffectQueueVertex.postprocess()

9b82becd 08/29/2016 06:32 PM Leszek Koltunski

Improvements for WAVE

4fde55a0 08/29/2016 04:51 PM Leszek Koltunski

Beginnings of the WAVE effect.

20af7b69 08/24/2016 09:31 PM Leszek Koltunski

Correct an important bug in the vertex shader.

b = 1/a if a!=0, 1 otherwise was incorrectly computed as b = 1.0 / (a+1.0-sign(a)). This, when 0<a<2^-24, suffers from 'round-off error': then a+1.0 = 1.0 (sic!) thus b = 1/0 !.

Correct way: b = 1.0 / ( a - (sign(a)-1.0) )

77fcb24d 08/11/2016 10:41 PM Leszek Koltunski

Fix for Bug #17: Regions of Fragment Effects migrate.

Fix is: don't send vertex position and the Fragment Effect region to the fragment shader already multiplied by the ModelView matrix (that introduces the imprecise interpolation because of the projection effect) but simply send both of them in local coords.

ff8ad0a7 07/20/2016 11:11 PM Leszek Koltunski

Fix for Bug #16: When rotated at an angle, surfaces get increasingly transparent.

This also fixes the saturation, chroma, alpha + contrast effects, while completely breaking macroblocks :)

30925500 07/17/2016 09:27 PM Leszek Koltunski

Fix for Bug #18: DISTORT effect: disappearing triangles

9420f2fe 07/16/2016 11:14 PM Leszek Koltunski

Fix for Bug 19: SWIRL effect: mess if Center out of Region.

2dacdeb2 06/29/2016 04:15 PM Leszek Koltunski

remove the 'Color' vertex attribute.

cd174a64 06/28/2016 01:01 PM Leszek Koltunski

Make the 'deform' effect continuous when 'center' point passes through (0,0) i.e. middle of the Object.

369ee56a 06/27/2016 10:57 PM Leszek Koltunski

fix in vertex shader

7c227ed2 06/27/2016 12:35 PM Leszek Koltunski

Bugfix in vertex shader (vertices were shot into outer space if P==S, i.e. if center point was exactly equal to the vertex being computed)

341c803d 06/27/2016 12:00 PM Leszek Koltunski

Progress with Vertex3D

0318e7e3 06/24/2016 11:05 AM Leszek Koltunski

Important bugfix in the vertex shader: there was division by 0 in case Center point was on the edge of the Object, resulting in some vertices being shot into outer space.

0df17fad 06/21/2016 01:02 PM Leszek Koltunski

- Javadoc for EffectNames
- make Matrix effects consistent with the rest (center of effect as last parameter!)
- bugfix for yesterday's bugfix (we only want to send 'EFFECT_REMOVED' messages if it was really the Application that called 'abortAll' and not when we are cleaning up everything)

f2fe7e28 06/16/2016 04:21 PM Leszek Koltunski

Major push towards simplifying DistortedObject's public API.
Beginning of work on VERTEX Effects - does not compile ATM!

d333eb6b 06/14/2016 04:24 PM Leszek Koltunski

Add license

6a06a912 05/25/2016 07:45 PM Leszek Koltunski

Initial commit