Hajime Hoshi
af9bd6a282
all: specify src-regions correctly
...
This parameter was not important and actually not used with usual
shaders. However, now this information will be important for the
restorable package optimization later.
There was a performance issue that was caused by srcRegions, but
now this should not happen thanks to FilterUniformVariables.
Updates #1293
2024-09-08 22:24:15 +09:00
Hajime Hoshi
1488e5e685
internal/graphicscommand: add attributes to images
2024-09-07 23:38:16 +09:00
Hajime Hoshi
46cf09197b
internal/graphicscommand: enable to show shader names
2024-09-07 22:06:41 +09:00
Hajime Hoshi
b6ab7a10c1
internal/graphics: unify QuadVertices
...
This is a preparation for adding members to Vertex.
Updates #2640
2024-08-12 00:29:24 +09:00
Hajime Hoshi
7b46df44ee
internal/graphicscommand: bug fix: buffered write pixel args might never be released
...
Closes #3036
2024-07-12 11:25:50 +09:00
Bertrand Jung
22fd1f107e
internal/graphics: renamed shader image count to specify src ( #3012 )
...
This just specifies that the constant refers to the number of source images passed to a shader.
This makes a distinction with the number of dst images, that could potentially be more than 1 in the future.
2024-06-10 02:02:47 +09:00
Hajime Hoshi
e5d10c47e7
internal/graphicsdriver: reland: rename FillRule constants
...
Updates #3006
2024-06-08 12:16:20 +09:00
Hajime Hoshi
6ac1270cb0
Revert "internal/graphicsdriver: rename FillRule constants"
...
This reverts commit ab4a3af1b5
.
Reason: compile error on Windows
2024-06-08 12:10:27 +09:00
Hajime Hoshi
ab4a3af1b5
internal/graphicsdriver: rename FillRule constants
...
Updates #3006
2024-06-08 11:54:46 +09:00
Hajime Hoshi
bc9e9d8562
ebiten: move the builtin shader to internal/builtinshader
...
Updates #2861
2024-04-20 21:23:37 +09:00
Hajime Hoshi
4e93efa5ac
internal/graphicsdriver: reland: add FillRule and replace boolean values with this
...
Updates #2782
2023-11-04 19:09:50 +09:00
Hajime Hoshi
f695df5924
Revert "internal/graphicsdriver: add FillRule and replace boolean values with this"
...
This reverts commit 38cf964a3b
.
Reason: build failure on Windows
2023-11-04 19:02:40 +09:00
Hajime Hoshi
38cf964a3b
internal/graphicsdriver: add FillRule and replace boolean values with this
...
Updates #2782
2023-11-04 18:57:31 +09:00
Hajime Hoshi
27fd10595b
internal/ui: refactoring: reduce global functions and prefer Get()
2023-10-15 03:40:48 +09:00
Hajime Hoshi
f269b61903
internal/atlas: introduce a managed byte slice pool
...
A managed byte slice from the new byte slice pool has a function
to release and put it back to the pool explicitly, and this doesn't
rely on GCs.
Updates #1681
Closes #2804
2023-10-09 20:32:32 +09:00
Hajime Hoshi
4ca3fa5e57
internal/graphicsdriver: replace Region with image.Rectangle ( #2791 )
...
Closes #2790
2023-09-28 14:29:55 +09:00
Hajime Hoshi
534370f7b1
internal/graphics: enable to specify regions for each source image
...
This is a preparation to specify different sizes of source images.
Updates #1870
2023-08-27 21:15:01 +09:00
Hajime Hoshi
e270dea460
internal/graphicsdriver: use []PixelsArgs for ReadPixels
...
Closes #2592
2023-08-17 03:06:48 +09:00
Hajime Hoshi
e98acd3dc7
internal/graphicsdriver: refactoring: use image.Rectangle
2023-04-29 01:12:05 +09:00
Hajime Hoshi
49582519c1
all: add a compiler directive kage:unit
...
This change adds a new compiler directive 'kage:unit' to Kage. This
takes one of these two values: 'pixel' and 'texel'. The default value
is 'texel'.
With the pixel-unit mode, all the built-in functions treats pixels
instead of texels, and the texCoord argument of Fragment is in pixels.
This simplifies shader programs as programs no longer have the notion
of texels.
With the texel-unit mode, the behavior is the same as the current
behavior.
Closes #1431
2023-04-23 22:11:57 +09:00
Pierre Curto
4de807cc44
all: fix typos ( #2558 )
...
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
2023-01-28 19:06:38 +09:00
Hajime Hoshi
09a7d39874
internal/graphicsdriver: add Blend struct
...
This is a preparation to specify blend factors and blend operators.
Updates #2382
2022-10-16 01:08:26 +09:00
Hajime Hoshi
534d82c17d
internal/builtinshader: move Filter and Address from internal/graphicsdriver
2022-10-02 23:24:15 +09:00
Hajime Hoshi
6fca8edc1b
internal/graphicscommand: remove unused arguments from DrawTriangles
...
Updates #2369
2022-10-02 22:21:11 +09:00
Hajime Hoshi
311aa7dcf8
all: use Kage shaders in internal packages
...
Updates #2369
2022-10-02 19:17:09 +09:00
Hajime Hoshi
b2f874a244
image/rectangle: read pixels only for necessary parts
...
Closes #2274
2022-08-27 23:23:33 +09:00
Hajime Hoshi
7542bbc29c
internal/graphicscommand: bug fix: test failures
...
Updates #2236
2022-08-08 03:10:50 +09:00
Hajime Hoshi
afed6a83c6
internal/graphics: change the naming convention: Num -> Count
...
This change also renames ebiten.MaxIndicesNum -> ebiten.MaxIndicesCount.
2022-07-13 02:02:44 +09:00
Hajime Hoshi
8522bfd0bf
internal/graphicscommand: bug fix: replacePixelsCommand should not read pixels
...
Reading pixels, writing pixels, and using the image as a source might
cause a flaky behavior with Metal. Stop reading pixels if possible.
Closes #2180
2022-07-05 23:30:26 +09:00
Hajime Hoshi
31fd736ca5
internal/graphicscommand: refactoring: unify NewScreenFrameBufferImage and NewImage
2022-06-06 09:21:11 +09:00
Hajime Hoshi
34e23f5256
internal/restorable: treat texels instead of pixels
...
Updates #1820
2022-04-02 04:25:27 +09:00
Hajime Hoshi
81b9f91f86
internal/graphicscommand: compile shaders lazily
...
With DirectX, the graphics driver cannot be determined until the
main loop starts, as a transparent window cannot be treated with
DirectX so far. On the other hand, compiling shaders requires a
graphics driver as it requires information about Y directions of
NDCs and framebuffers.
This change delays compiling shaders until the graphics commands
are actually executed in the main loop.
Updates #1007
Updates #2019
2022-03-21 21:09:02 +09:00
Hajime Hoshi
5fe6791b5d
internal/graphicscommand: add a new paramter 'mask' to ReplacePixels
2022-03-21 01:11:01 +09:00
Hajime Hoshi
4cbce71b2b
internal/graphicscommand: move the choice of graphics drivers to internal/ui
2022-03-20 02:51:31 +09:00
Hajime Hoshi
77f765d483
internal/testing: bug fix: considering the case when Y is inverted
...
Closes #2003
2022-02-27 22:14:32 +09:00
Hajime Hoshi
4ca1220671
internal/graphicscommand: bug fix: compile error, test failures
2022-02-27 20:13:21 +09:00
Hajime Hoshi
df60c4c92d
internal/driver: rename to internal/graphicsdriver
2022-02-06 20:41:32 +09:00
r3vit
57c45a13e4
Remove dot imports from tests - Remove dot imports ( #1837 )
...
Closes #1824
2021-10-02 19:58:48 +09:00
Hajime Hoshi
21aa96f9f5
internal/affine: Refactoring: Make ColorM interface
2021-07-27 12:10:22 +09:00
Hajime Hoshi
b466a0cbd7
ebiten: Add EvenOdd to DrawTrianglesOptions and DrawShaderTrianglesOptions
...
Updates #844
Closes #1684
2021-07-05 03:35:55 +09:00
Hajime Hoshi
ed494dbf59
restorable: Reland: Do not record pixels if restoring is not requried
...
This change also remove the restrictions of operations on
graphicscommand.Image. For example, now DrawTriangles and
ReplacePixels can be mixed on the same image.
Fixes #1022
2020-11-14 15:00:16 +09:00
Hajime Hoshi
ed028110cf
ebiten: Allow rendering on a sub-image by scissor test
...
Fixes #1255
2020-11-08 00:58:44 +09:00
Hajime Hoshi
bf515bb594
Update version to v2.0.0-alpha
2020-10-04 04:30:40 +09:00
Hajime Hoshi
64a6b39240
Revert "restorable: Do not record pixels if restoring is not requried"
...
This reverts commit 5e1f263d6d
.
Reason: Issue #1304
2020-08-17 00:00:12 +09:00
Hajime Hoshi
5e1f263d6d
restorable: Do not record pixels if restoring is not requried
...
Fixes #1022
2020-08-16 20:07:17 +09:00
Hajime Hoshi
a45e241da1
shaderir/metal: Implement the shader IR compiler for Metal
...
Fixes #1165
2020-08-08 19:14:57 +09:00
Hajime Hoshi
36e9803cea
shader: Enable to get pixels from multiple images
...
Updates #1193
2020-07-19 02:33:43 +09:00
Hajime Hoshi
5dd073fcbb
restorable, graphicscommand: Remove uniform variables
2020-07-19 01:55:01 +09:00
Hajime Hoshi
e0d5763a60
shader: Use the fixed number of images for shaders
...
This changes uses arrays rather than slices in order to avoid heap
allocations.
Updates #1193
2020-07-18 18:27:47 +09:00
Hajime Hoshi
d217bc6033
ebiten: Sparate textures from uniforms at DrawTrianglesWithShader
...
Updates #1193
Updates #1239
2020-07-09 01:59:21 +09:00