Hajime Hoshi
63df6168d9
internal/shader: use plural forms for Kage compiler directives
...
This change renames
```
//kage:unit texel
//kage:unit pixel
```
to
```
//kage:unit texels
//kage:unit pixels
```
.
Closes #2717
2023-08-01 11:41:38 +09:00
Hajime Hoshi
5ddf1df423
internal/shaderir: remove ConstType
...
Closes #2550
2023-07-29 15:34:30 +09:00
Hajime Hoshi
e225f118fb
internal/shaderir: use ConstType just for an assetion
...
Updates #2550
2023-07-29 14:02:26 +09:00
Hajime Hoshi
9d2178cf71
internal/shaderir: rename the built-in func to get a texel to __texelAt
2023-04-23 22:57:30 +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
Hajime Hoshi
88fe3d1287
internal/shaderir: rename TextureNum to TextureCount
2022-12-24 15:55:05 +09:00
Hajime Hoshi
88e5d5e059
Revert "internal/shaderir: refactoring: remove Program.TextureNum"
...
This reverts commit c2bea16776
.
Reason: test compilation errors
2022-12-24 15:53:16 +09:00
Hajime Hoshi
c2bea16776
internal/shaderir: refactoring: remove Program.TextureNum
2022-12-24 15:15:41 +09:00
Hajime Hoshi
0b9cbaa1ed
internal/shader: introduce integer vectors (ivec2, ivec3, ivec4)
...
Closes #1911
2022-11-21 00:31:23 +09:00
Hajime Hoshi
b211b79a5c
internal/shader: use a return statement in a fragment shader entrypoint
...
Updates #2247
2022-08-17 22:02:13 +09:00
Hajime Hoshi
205245b094
internal/shader: implement a new built-in function discard
...
Closes #1969
2022-08-09 11:31:59 +09:00
Hajime Hoshi
c01821ca5c
internal/shader: use all functions for vector comparisons
...
Updates #2186
2022-07-09 02:30:16 +09:00
Hajime Hoshi
5c63c4a4aa
internal/graphicsdriver/metal: support macOS 10.12 by removing packed types
...
From the Metal shading language specification [1] Table 2.2.3, attribute
variables in Ebitengine's vertices don't have to be packed. Then, we can
remove `packed` types.
[1] https://developer.apple.com/metal/Metal-Shading-Language-Specification.pdf
Closes #2107
2022-05-28 23:57:59 +09:00
Hajime Hoshi
dcccd27629
internal/shaderir/msl: bug fix: mod for a vector and a scalar didn't work
...
Updates #2029
2022-03-26 02:57:38 +09:00
Hajime Hoshi
cfd0de5c41
internal/shaderir: make outputs for unexpected operators consistent
2022-03-26 01:40:02 +09:00
Hajime Hoshi
a617576879
internal/shaderir: replace Mul with ComponentWiseMul and MatrixMul
...
This is a preparation for DirectX / HLSL.
Updates #1007
2022-03-13 19:17:46 +09:00
Hajime Hoshi
044d41dd2d
internal/shaderir: change Op from string to int
...
This is a preparation to distinguish Hadamard product and matrix
product for HLSL.
Updates #1007
2022-03-13 16:20:04 +09:00
Hajime Hoshi
98e2d86ea3
internal/shaderir/msl: refactoring
2022-03-12 00:18:55 +09:00
Hajime Hoshi
5715539a0f
internal/shaderir/glsl, internal/shaderir/msl: refactoring
2022-03-11 15:18:38 +09:00
Hajime Hoshi
6f00221051
internal/shaderir/msl: rename the package name
...
Updates #2010
2022-03-10 16:25:11 +09:00
Hajime Hoshi
47bfd0db9e
internal/shaderir/metal: rename to msl
...
Closes #2010
2022-03-10 00:14:06 +09:00