Hajime Hoshi
e406ebb1aa
ebiten: Rename imageSrcTextureRegion -> imageSrcRegionOnTexture
...
Updates #1325
2020-09-19 19:36:53 +09:00
Hajime Hoshi
9f7d6962ff
ebiten: Rename shader functions to get colors from textures
...
Updates #1325
2020-09-19 19:01:05 +09:00
Hajime Hoshi
b52de27d49
ebiten: Refactoring shader.go
2020-09-19 17:35:43 +09:00
Hajime Hoshi
806e30926c
ebiten: Remove unreachable code
2020-09-17 20:57:13 +09:00
Hajime Hoshi
abbb929148
ebiten: Bug fix: Wrong uniform type was used
...
This change also includes PanicOnErrorAtImageAt, which panics when
an error is detected at (*Image).At. This function is only for testing.
Fixes #1349
2020-09-17 20:52:32 +09:00
Hajime Hoshi
5e15ebf580
ebiten: Set zero values for lacking uniform variables
...
Fixes #1338
2020-09-13 04:29:32 +09:00
Hajime Hoshi
850303b770
ebiten: Change the type of Uniforms to map[string]interface{}
...
Fixes #1324
2020-09-06 21:02:30 +09:00
Hajime Hoshi
dd7b0d81ae
ebiten: Rename shader builtin functions
...
* imageSrcTextureSourceRegion -> imageSrcTextureRegion
* image[N]TextureAt -> imageSrc[N]At
* image[N]TextureBoundsAt -> imageSrc[N]BoundsAt
Updates #1325
2020-09-01 21:31:50 +09:00
Hajime Hoshi
20a01ed328
ebiten: Error when the entrypoint is missing
...
Fixes #1323
2020-09-01 00:37:16 +09:00
Hajime Hoshi
ed240b8393
ebiten: Add shader builtin functions: imageSrcTextureSourceRegion
...
Updates #1294
2020-08-12 03:34:46 +09:00
Hajime Hoshi
8bc1c8bbd8
ebiten: Rename shader internal variables
2020-08-11 05:18:14 +09:00
Hajime Hoshi
70acb9c1f6
shader: Rename shader bultin functions
...
Renamed image0TextureSize to imageSrcTextureSize, and removed the
other texture-size functions.
As texture-coordinates are always in image0's texture texels,
calculations with texels are always done with image0's texture texels.
Then, other texture-size functions are useless. To avoid confusion,
let's remove the functions and leave the necessary funciton.
2020-08-11 05:02:22 +09:00
Hajime Hoshi
609a3c4e22
ebiten: Bug fix: Fix the texel calculation
...
In shaders, texCoord is always in texture0's texels. Convert them
at imageNTextureAt functions correctly.
Fixes #1290
2020-08-11 04:15:07 +09:00
Hajime Hoshi
69f87d5fd1
ebiten: Add new shader builtin functions: image[N]TextureBoundAt
...
Fixes #1287
2020-08-11 03:24:54 +09:00
Hajime Hoshi
68ca0c634e
ebiten: Rename builtin shader functions
...
* textureDstSize -> imageDstTextureSize
* texture[N]Size -> image[N]TextureSize
* texture[N]At -> image[N]TextureAt
Updates #1287
2020-08-11 02:07:53 +09:00
Hajime Hoshi
a4334c5464
shader: Use arrays at uniform variables
...
Fixes #1274
2020-08-01 17:22:10 +09:00
Hajime Hoshi
ca3fd4eaa4
ebiten: Add texture[ID]Size functions for shaders
...
Fixes #1239
2020-07-26 15:18:01 +09:00
Hajime Hoshi
d08a04a635
ebiten: Refactoring
2020-07-26 15:05:00 +09:00
Hajime Hoshi
d017a1b95e
Swap the order of the dependencies 'buffered and 'mipmap'
2020-07-26 12:15:23 +09:00
Hajime Hoshi
2fb5108bbe
shader: Rename viewportSize to textureDstSize
...
Updates #1239
2020-07-26 00:03:55 +09:00
Hajime Hoshi
1217db3b1e
ebiten: Remove user-defined vertex shaders
...
Fixes #1253
2020-07-20 10:07:55 +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
4bd3bc16ac
shader: Define special variables for textures __t%d
...
This eanbles to define texture0At to texture3At.
Updates #1193
2020-07-18 19:37:50 +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
4021c24534
shader: Separate uniform variables and texture variabls
...
Textures cannot be treated as a regular variable, then they should
be treated differently from other uniform variables.
Add a new function texture0At replacing texture2D.
Updates #1239
2020-07-08 01:12:07 +09:00
Hajime Hoshi
545342262f
examples/shader: Show an image
2020-06-24 01:41:27 +09:00
Hajime Hoshi
b64dc627e9
shader: Add a builtin function viewportSize
2020-06-10 23:07:57 +09:00
Hajime Hoshi
ba36d5a8e9
shader: Reland: Add a predefined uniform variable: __viewportSize
2020-06-07 00:14:09 +09:00
Hajime Hoshi
dde7d00231
shader: Accept an ast directly
...
This is a preparation to modify the AST before passign to Compile.
2020-06-06 23:12:01 +09:00
Hajime Hoshi
fe308f1971
Revert "shader: Add a predefined uniform variable: Internal_ViewportSize"
...
This reverts commit 6f411842f0
.
Reason: Test failures on internal/restorable
2020-06-05 04:36:09 +09:00
Hajime Hoshi
6f411842f0
shader: Add a predefined uniform variable: Internal_ViewportSize
2020-06-05 03:00:43 +09:00
Hajime Hoshi
3dbf4c0a83
shader: Enable to specify entrypoint names
2020-06-05 01:11:39 +09:00
Hajime Hoshi
d0aa18ddb9
Add shader public APIs experimentally
...
Updates #1168
2020-06-04 01:40:50 +09:00