Commit Graph

51 Commits

Author SHA1 Message Date
Hajime Hoshi
256adfff9d internal/affine: Add tests
Updates #1474
2021-01-28 02:24:24 +09:00
Hajime Hoshi
a6dd6196b4 internal/affine: Cache scaling ColorM for heuristic optimization
Closes #1474
2021-01-28 02:23:22 +09:00
Hajime Hoshi
14abc28d3a internal/color: Remove Add 2021-01-27 02:37:56 +09:00
Hajime Hoshi
bf515bb594 Update version to v2.0.0-alpha 2020-10-04 04:30:40 +09:00
Hajime Hoshi
6c33ed107f affine: Add more tests for (*ColorM).Invert 2020-07-04 01:58:37 +09:00
Hajime Hoshi
2e8e35750d affine: Refactoring 2020-07-04 01:36:48 +09:00
Gabriel Ochsenhofer
94b5747806
affine: Add functions to invert ColorM (#1233)
Fixes #548
2020-07-04 01:23:47 +09:00
Hajime Hoshi
b65a3d372b affine: Add ColorM.Scale tests 2019-01-23 02:50:30 +09:00
Hajime Hoshi
54019a4735 affine: Improve speed of ScaleOnly 2019-01-23 02:10:59 +09:00
Hajime Hoshi
690c3cf981 graphics: Embed 'scale' part of the color matrix
If the color matrix includes only 'scale' part, they are embedded
into vertices in order to reduce draw calls.

Fixes #662
2018-08-10 23:20:55 +09:00
Hajime Hoshi
77e905eb25 Revert "graphics: Embed color matrices values to vertices (#655)"
This reverts commit 5a9235aaf9.
2018-08-06 01:44:31 +09:00
Hajime Hoshi
9af8e621bd Revert "affine: Refactoring: Unify two element slices into one"
This reverts commit da662b384c.
2018-08-06 01:44:31 +09:00
Hajime Hoshi
da662b384c affine: Refactoring: Unify two element slices into one 2018-07-27 01:51:49 +09:00
Hajime Hoshi
2b4785f863 affine: Remove unused function 2018-07-27 01:23:14 +09:00
Hajime Hoshi
5a9235aaf9
graphics: Embed color matrices values to vertices (#655)
Fixes #531
2018-07-26 11:37:27 +09:00
Hajime Hoshi
e3ab158d7d affine: Allow absence of the translate part 2018-07-21 17:21:55 +09:00
Hajime Hoshi
b4ace53596 affine: Remove GeoM to avoid GeoM allocations on the heap 2018-06-17 00:59:50 +09:00
Hajime Hoshi
61d7f1e9b5 affine: Bug fix: (*GeoM).det() was wrong (#547) 2018-03-12 11:11:53 +09:00
Hajime Hoshi
c2872017ab affine: Add GeoM.Invert, IsInvertible (#547) 2018-03-11 19:13:39 +09:00
Hajime Hoshi
f1ba3e5894 affine: Optimization Equals 2018-03-04 23:23:11 +09:00
Hajime Hoshi
dca60a2520 affine: Make initial affine.GeoM{} value identity (again) 2018-02-28 02:38:57 +09:00
Hajime Hoshi
1a2a108639 affine: Add comments 2018-02-28 02:21:07 +09:00
Hajime Hoshi
ccd9241b07 affine: Refactoring ColorM 2018-02-28 02:14:09 +09:00
Hajime Hoshi
8c8e512059 affine: User nillable pattern for ColorM 2018-02-28 02:14:06 +09:00
Hajime Hoshi
bea63946fc affine: Bug fix: ColorM.Apply was wrong when alpha is 0 2018-02-27 12:16:16 +09:00
Hajime Hoshi
2bd099014b affine: Remove geoMImpl and use nillable pattern 2018-02-27 01:02:53 +09:00
Hajime Hoshi
40b1948baa graphics: Stop unnecessary copy of elements 2018-02-20 01:17:21 +09:00
Hajime Hoshi
f1f7e5bcec affine: Transpose ColorM implementation for optimization 2018-02-20 00:53:53 +09:00
Hajime Hoshi
9b361086d7 affine: Use float32 inside of ColorM 2018-02-20 00:33:56 +09:00
Hajime Hoshi
896a47b2ee affine: Reduce copying cost of GeoM 2018-02-18 23:39:24 +09:00
Hajime Hoshi
929dfa1cfb affine: Implement ColorM.Add for backward compatibility: Don't use this anyway 2018-02-13 03:06:19 +09:00
Hajime Hoshi
95480d0644 affine: Separate ColorM impl into two slices
This fix avoids unnecessary allocating arrays.
2018-02-12 19:01:01 +09:00
seebs
0b7ba8e573 Do GeoM projection on CPU (#477)
Handling GeoM projection on CPU may seem like a weird choice, given
how fast GPU is, but it pays off:

* You only have to do a very small subset of the actual matrix
  multiply.
* You don't have to construct a matrix in the vertex shader.
* Six fewer float32 values per vertex.
* You do still have to do the matrix computation for each vertex,
  though.

Signed-off-by: Seebs <seebs@seebs.net>
2018-01-14 16:01:55 +09:00
Hajime Hoshi
6ae67fc6dd graphics: Add ColorM.Apply (#432) 2017-10-14 23:58:09 +09:00
Hajime Hoshi
a7fc463d91 doc: Improve comments 2017-10-01 03:15:50 +09:00
Hajime Hoshi
2a9873a4bb affine: Add GeoM.Apply (#432) 2017-09-16 17:19:45 +09:00
Hajime Hoshi
803aa77c20 affine: Refactoring 2017-09-16 15:49:12 +09:00
Hajime Hoshi
6db96f5442 affine: Make GeoM.Rotate faster 2017-05-28 04:16:11 +09:00
Hajime Hoshi
dad427920d affine: Add Reset function 2017-05-28 00:49:44 +09:00
Hajime Hoshi
6db994f0e8 graphics: Optimize GeoM 2017-05-24 00:57:57 +09:00
Hajime Hoshi
6e84919ed5 affine: Make Scale/Translate faster 2017-01-20 01:08:14 +09:00
Hajime Hoshi
48c8934838 affine: Refactoring 2017-01-20 00:46:25 +09:00
Hajime Hoshi
dfcd9fc30c graphics: Make matrices faster 2017-01-20 00:37:51 +09:00
Hajime Hoshi
71a4465c6f graphics: Improve matrices speed 2017-01-19 12:07:31 +09:00
Hajime Hoshi
9087269212 graphics: Make copying GeoM faster 2017-01-19 10:59:07 +09:00
Hajime Hoshi
a744285b51 graphics: Make copying ColorM faster 2017-01-18 02:25:23 +09:00
Hajime Hoshi
7bd2fb6ce2 graphics: Bug fix: ColorM.Scale worked wrongly 2016-11-27 23:27:20 +09:00
Hajime Hoshi
b188a0dd99 affine: Stop using multiple-dimension array for consistency 2016-11-01 23:32:27 +09:00
Hajime Hoshi
edf336499c affine: Revert ColorM implementation to use float64 array 2016-11-01 23:32:24 +09:00
Hajime Hoshi
4915531450 affine: Add ColorM.Equals 2016-11-01 00:28:07 +09:00