Hajime Hoshi
0a537b7ad2
internal/shader: bug fix: a number literal must be represented as floats in some contexts
2022-01-17 21:14:07 +09:00
Hajime Hoshi
4940159e5b
internal/shader: bug fix: operators between vec/mat and float should work
...
Closes #1963
2022-01-17 20:52:44 +09:00
Hajime Hoshi
260f7e07df
internal/shader: bug fix: deduction checks for the %
operator were lacked
2022-01-14 03:51:04 +09:00
Hajime Hoshi
08ddb4233b
internal/shaderir/glsl: bug fix: % was not available on old GLSLs
...
Use a new utility function modInt instead.
Closes #1951
2022-01-12 01:41:09 +09:00
Hajime Hoshi
d110716dc0
internal/shader: bug fix: check types correctly for assign operators
...
Closes #1950
2022-01-12 00:39:39 +09:00
Hajime Hoshi
83bd0772d4
internal/shader: bug fix: % should be valid only for integers
...
Closes #1947
2022-01-11 23:53:09 +09:00
Hajime Hoshi
374871c031
internal/shader: bug fix: a meaningless statement should raise an error (a non-call expression statement)
...
Updates #1898
2021-12-27 23:14:05 +09:00
Hajime Hoshi
481a2145ae
internal/shader: bug fix: a meaningless statement should raise an error
...
Closes #1898
2021-12-27 22:05:58 +09:00
Hajime Hoshi
8ae6793d4d
internal/shader: Check the number of arguments
2021-11-14 17:34:06 +09:00
Hajime Hoshi
9be4ce928b
internal/shader: Add more tests for const
...
Updates #1847
2021-11-14 17:06:54 +09:00
Hajime Hoshi
36ce3b836e
internal/shader: Bug fix: Treat a non-typed consntat argument as a float
...
Closes #1874
2021-11-14 15:47:59 +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
853c1f2b92
internal/shaderir/glsl: Bug fix: Remove uncalled functions
...
Some built-in functions like dFdx is not available in a vertex shader,
then a function that calls such built-in function should not be in
a vertex shader.
Closes #1701
2021-07-09 20:22:40 +09:00
Hajime Hoshi
77b51e4707
internal/shader: Add more tests and improve the comment
...
Updates #1192
2021-04-09 01:25:37 +09:00
Hajime Hoshi
1cdc6ea72b
internal/shader: Bug fix: Treat multiple constant definitions in one statement correctly
...
Updates #1192
2021-04-09 01:18:38 +09:00
Hajime Hoshi
3b6fa891ac
internal/shader: Bug fix: Error on duplicated const/var names
...
Updates #1192
2021-04-09 00:12:17 +09:00
Hajime Hoshi
59a80cf953
internal/shader: Implement basic constants
...
Updates #1192
2021-04-09 00:00:49 +09:00
Hajime Hoshi
5f81065d78
internal/shader: Make function duplications error
...
Closes #1430
2021-02-07 22:24:23 +09:00
Hajime Hoshi
d3fbf377ef
shader: Bug fix: A wrong usage of a pointer
2020-12-20 13:32:22 +09:00
Hajime Hoshi
b1d7a5f595
shaderir/glsl: Enable dFdx for WebGL
...
With WebGL1, an extension is required for dFdx. On the other hand,
with WebGL2, GLSL ES 300 is required and the extension is forbidden.
This change fixes shaderir/glsl to switch the output depends on the
WebGL version.
This change also adds a new build tag 'ebitenwebgl1' forcing WebGL 1.
Updates #1404
2020-11-21 19:07:54 +09:00
Hajime Hoshi
185e367295
shader: Implement cap function
...
Fixes #1361
2020-10-17 23:36:09 +09:00
Hajime Hoshi
bf515bb594
Update version to v2.0.0-alpha
2020-10-04 04:30:40 +09:00
Hajime Hoshi
3c71eba446
shaderir: Bug fix: Implement atan2 for Metal correctly
...
Fixes #1360
2020-09-22 04:29:34 +09:00
Hajime Hoshi
ab004031d0
shader: Reland: Bug fix: Checking unused variables defined with var
2020-09-17 17:46:35 +09:00
Hajime Hoshi
ac971f77c5
Revert "shader: Bug fix: Checking unused variables defined with var"
...
This reverts commit 4d3d3134d5
.
Reason: Test failures
2020-09-17 17:32:07 +09:00
Hajime Hoshi
4d3d3134d5
shader: Bug fix: Checking unused variables defined with var
2020-09-17 17:29:37 +09:00
Hajime Hoshi
ded223ead0
shader: Bug fix: selector is not available on a blank identifier
2020-09-14 03:41:25 +09:00
Hajime Hoshi
e1d8629189
shader: Bug fix: a blank identifier lhs and += cannot work
2020-09-14 00:51:27 +09:00
Hajime Hoshi
fd51abfb0d
shader: Bug fix ++/-- must not be applied to a blank identifier
2020-09-14 00:32:47 +09:00
Hajime Hoshi
7666987b09
shader: Bug fix: a blank identifier cannot be used as values
2020-09-13 23:55:25 +09:00
Hajime Hoshi
154f86e6c1
shader: Check unused local variables
...
Fixes #1328
2020-09-13 22:36:41 +09:00
Hajime Hoshi
e543d4f107
shader: Bug fix: true/false should be available as a local variable
2020-09-13 20:38:51 +09:00
Hajime Hoshi
a5af597594
shader: Forbid assigning to special variables
2020-09-13 05:19:20 +09:00
Hajime Hoshi
ed4a7e1856
shader: Forbid init functions
...
Fixes #1331
2020-09-12 19:50:23 +09:00
Hajime Hoshi
8833e46c7e
shader: Refactoring
2020-09-12 18:54:36 +09:00
Hajime Hoshi
a0db26f234
ebiten: Bug fix: Test failuer (TestShaderWrongReturn)
2020-09-12 18:36:22 +09:00
Hajime Hoshi
d001f49ad7
shader: Bug fix: Treat multiple-context at return correctly
2020-09-12 17:44:04 +09:00
Hajime Hoshi
2fb1033183
shader: Initialize output parameters explicitly
2020-09-12 00:35:14 +09:00
Hajime Hoshi
337f44c916
shader: Add Metal tests
...
Fixes #1340
2020-09-10 01:19:02 +09:00
Hajime Hoshi
0a0401e217
shader: Refactoring: Simplify calculation of LocalVarIndexOffset
2020-09-08 02:42:43 +09:00
Hajime Hoshi
41d4fc288b
shader: Reword
2020-09-08 01:40:49 +09:00
Hajime Hoshi
f61a916e4a
shaderir/glsl: Bug fix: Calculate local variable indices correctly
...
Fixes #1339
2020-09-08 00:19:07 +09:00
Hajime Hoshi
4308bbbc31
shader: Check the existence of 'return'
2020-09-06 22:33:27 +09:00
Hajime Hoshi
e0b8b9945f
shader: Check returning value types and the number
2020-09-06 22:08:57 +09:00
Hajime Hoshi
29c7b7687f
shaderir: Add Program.UniformNames
...
Updates #1324
2020-09-06 03:41:17 +09:00
Hajime Hoshi
55f0c983ba
shader: Bug fix: Ignore blank identifiers for the duplication check
...
Fixes #1330
2020-09-03 03:03:06 +09:00
Hajime Hoshi
4ac11bf156
shader: Bug fix: Treat number literals in function calls correctly
2020-09-03 02:45:22 +09:00
Hajime Hoshi
0b1d29b6e7
shader: Bug fix: Returning value's integer literals were wrong
2020-09-03 02:10:52 +09:00
Hajime Hoshi
f5829b2cf3
shader: Check at least one variable on left side of :=
...
Updates #1330
2020-09-03 01:15:41 +09:00
Hajime Hoshi
8c779447db
shader: Friendly error messages when local variable names are duplicated
...
Fixes #1254
2020-08-30 21:22:10 +09:00