Hajime Hoshi
2a1d23d926
internal/shader: bug fix: panic when an assignment mismatch happens
...
Closes #2654
2023-04-26 22:09:25 +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
b5ca404c42
internal/shader: bug fix: a swizzling 'r' didn't work for vec2
...
Closes #2652
2023-04-23 21:29:20 +09:00
Hajime Hoshi
df32901dce
internal/shader: refactoring
2023-04-16 18:37:06 +09:00
Hajime Hoshi
ad7d5a86f9
internal/shader: bug fix: check the type for composite literal
...
Closes #2348
2023-02-20 23:07:11 +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
06bc569b73
internal/shader: bug fix: wrongly typed constants were unexpectedly used
...
Closes #2549
2023-01-20 02:26:39 +09:00
Hajime Hoshi
f129c23393
all: update URLs in comments
2022-11-21 01:46:50 +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
5aecd6762c
internal/shader: refactoring
2022-11-20 18:25:08 +09:00
Hajime Hoshi
dc1df824a5
internal/shader: more strict type checks with built-in functions
2022-11-20 17:47:53 +09:00
Hajime Hoshi
5d8216def3
internal/shader: stricter const type check
2022-11-20 15:52:33 +09:00
Hajime Hoshi
5f4e3a0348
internal/shader: add swizzling check
2022-11-19 22:39:17 +09:00
Hajime Hoshi
1703297f37
internal/shader: add a test for type shadowing
2022-09-24 19:00:23 +09:00
Hajime Hoshi
7f91a681e3
internal/shader: check type redeclaration
2022-09-24 18:56:01 +09:00
Hajime Hoshi
c19f45b91c
internal/shader: bug fix: test failures
...
Updates #2304
2022-09-05 02:52:16 +09:00
Hajime Hoshi
85d54515cd
internal/shader: check types for && and || correctly
...
Updates #2256
2022-08-19 17:34:03 +09:00
Hajime Hoshi
d6047f3988
internal/shader: add type checks to compare two values
...
Closes #2187
2022-08-19 17:03:29 +09:00
Hajime Hoshi
63eee0600e
internal/shader: add type checks for the builtin function transpose
...
Updates #2184
2022-08-19 01:57:24 +09:00
Hajime Hoshi
7a94cbbd62
internal/shader: add refract
...
Closes #2255
2022-08-19 01:48:35 +09:00
Hajime Hoshi
13ae8f5872
internal/shader: add type checks for the builtin function faceforward
...
Updates #2184
2022-08-19 01:48:30 +09:00
Hajime Hoshi
73f12fa704
internal/shader: add type checks for the builtin function smoothstep
...
Updates #2184
2022-08-19 01:27:01 +09:00
Hajime Hoshi
f3ea274d20
internal/shader: add type checks for the builtin function mix
...
Updates #2184
2022-08-19 01:19:20 +09:00
Hajime Hoshi
ec851a85f5
internal/shader: add type checks for the builtin function step
...
Updates #2184
2022-08-19 00:25:04 +09:00
Hajime Hoshi
34cc6405dd
internal/shader: add type checks for the builtin function clamp
...
Updates #2184
2022-08-19 00:14:38 +09:00
Hajime Hoshi
82a9aac689
internal/shader: add type checks for the builtin function cross
...
Updates #2184
2022-08-18 23:45:01 +09:00
Hajime Hoshi
7af6c99954
internal/shader: add type checks for some builtin functions
...
Updates #2184
2022-08-18 23:21:25 +09:00
Hajime Hoshi
fb775d806c
internal/shader: disallow 'discard' in other functions than the fragment entry point
...
Closes #2248
2022-08-17 23:39:52 +09:00
Hajime Hoshi
b2a1b9a9a2
internal/shader: bug fix: float constant didn't work with assign operators
2022-07-09 22:29:42 +09:00
Hajime Hoshi
6dcd2ff11c
internal/shader: bug fix: wrong assignment rule for booleans
2022-07-08 02:19:42 +09:00
Hajime Hoshi
a3590cb258
internal/shader: add type checks to bool/int/flaot
...
Updates #2184
2022-07-08 00:22:55 +09:00
Hajime Hoshi
faa2ad5c6f
internal/shader: add type checks for mat2/mat3/mat4
...
Updates #2184
2022-07-07 23:05:26 +09:00
Hajime Hoshi
f89277fd85
internal/shader: add type checks to vec2/vec3/vec4
...
Updates #2184
2022-07-07 00:20:02 +09:00
Hajime Hoshi
853d94c3ef
internal/shader: implement strict type checks when calling a function
...
Closes #2032
2022-04-09 00:32:27 +09:00
Hajime Hoshi
15fe7158fd
internal/shader: implement strict type checks in assignments
...
Closes #1972
2022-04-09 00:02:20 +09:00
Hajime Hoshi
a936ffc032
internal/shader: restrict the number of arguments for atan/atan2
2022-03-26 19:40:04 +09:00
Hajime Hoshi
9b1adf799d
internal/shader: move syntax tests to internal/shader
2022-03-21 19:31:06 +09:00