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
fda0b1cbcb
internal/graphicsdriver/directx: reuse a compiled vertex shader if possible
...
D3DCompile can be a very slow function, and let's skip this if possible.
2022-12-24 17:44:54 +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
1ecac8d834
all: allow integer uniform variables for Kage shaders
...
Closes #2305
Updates #2448
2022-11-13 01:49:24 +09:00
Hajime Hoshi
b28b323920
internal/shaderir: use parentheses for vector equal operators
2022-08-21 04:19:56 +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
16ff5c5039
internal/shaderir: change the naming convention: Num -> Count
2022-07-13 02:02:48 +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
2d912a2387
internal/shaderir/hlsl: bug fix: wrong offset of uniform array variables
...
Closes #2038
2022-03-27 01:49:52 +09:00
Hajime Hoshi
d30a31b16c
internal/shaderir/hlsl: add function forward declarations
2022-03-26 19:10:03 +09:00
Hajime Hoshi
52376170a4
internal/shaderir: bug fix: float4x4(x) initialized all the components unexpectedly
...
See https://docs.microsoft.com/en-us/windows/win32/direct3d9/casting-and-conversion#parameter-value-modifiers
Updates #1007
2022-03-26 02:05:35 +09:00
Hajime Hoshi
cfd0de5c41
internal/shaderir: make outputs for unexpected operators consistent
2022-03-26 01:40:02 +09:00
Hajime Hoshi
4893b13acc
internal/shaderir: add internal/shaderir/hlsl
...
Updates #1007
2022-03-26 01:31:05 +09:00