Hajime Hoshi
00e45affe9
all: update OpenGL version from 2.1 to 3.2
...
'texelFetch' requires OpenGLSL 1.30, which requires OpenGL 3.0+.
macOS might not support OpenGL 3.0 and 3.1, so adopt 3.2.
Updates #1431
2023-04-23 14:25:36 +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
cf92158e33
ebiten: bug fix: add an indirect function call for a fragment shader
...
Closes #2245
Closes #2247
2022-08-17 16:37:37 +09:00
Hajime Hoshi
4afabe34ae
internal/shader: optimization: remove unnecessary local variables
...
Updates #2034
Updates #2188
2022-07-10 19:01:58 +09:00
Hajime Hoshi
b6a340a96f
internal/shader: optimization: use a regular return for a function with one output parameter
...
Updates #2034
Updates #2188
2022-07-10 18:18:46 +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
15fe7158fd
internal/shader: implement strict type checks in assignments
...
Closes #1972
2022-04-09 00:02:20 +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
4893b13acc
internal/shaderir: add internal/shaderir/hlsl
...
Updates #1007
2022-03-26 01:31:05 +09:00
Hajime Hoshi
d3b72d4ef9
internal/shader: add test files
...
Updates #2011
2022-03-10 01:02:51 +09:00
Hajime Hoshi
8b8b96c9e7
internal/shader: bug fix: wrong test (int*float)
2022-01-21 01:31:46 +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
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
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
59a80cf953
internal/shader: Implement basic constants
...
Updates #1192
2021-04-09 00:00:49 +09:00
Hajime Hoshi
185e367295
shader: Implement cap function
...
Fixes #1361
2020-10-17 23:36:09 +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
154f86e6c1
shader: Check unused local variables
...
Fixes #1328
2020-09-13 22:36:41 +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
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
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
a9b94a183b
shader: Implement swapping variables
...
Fixes #1248
2020-08-16 18:40:45 +09:00
Hajime Hoshi
06ed4f5444
shader: Implement len function
...
Fixes #1279
2020-08-16 02:07:39 +09:00
Hajime Hoshi
f6c3e0579f
shaderir: Adopt the precision 10 for float literals
...
Adopted the same precision of (*math/big.Float).String().
2020-08-13 00:01:16 +09:00
Hajime Hoshi
50cd33ed9b
shader: Bug fix: Use integer literals in the integer context
...
Fixes #1299
2020-08-12 13:47:22 +09:00
Hajime Hoshi
18732ca879
shader: Bug fix: Wrong type deduction with int(x)
...
Fixes #1298
2020-08-12 12:16:22 +09:00
Hajime Hoshi
ee049a19ac
shader: Bug fix: Wrong local variable index in a block in the fragment entry point
2020-08-10 02:29:49 +09:00
Hajime Hoshi
9b6b306ca3
shader: Bug fix: Wrong local variable index in a block in an entry point
2020-08-10 02:22:09 +09:00
Hajime Hoshi
e534fe8246
shader: Add more tests using a for-loop
2020-08-10 01:14:42 +09:00
Hajime Hoshi
5d2606b6a5
shader: Bug fix: Wrong local variable indices in blocks
2020-08-10 01:09:02 +09:00
Hajime Hoshi
a0494210c3
shader: Bug fix: Wrong local variable index in a block
2020-08-09 23:14:28 +09:00
Hajime Hoshi
5dc0d4e1a4
shader: Add more tests about 'for' loops
2020-08-09 22:26:57 +09:00
Hajime Hoshi
dee8690502
shaderir/glsl: Bug fix: Copying an array did not work on GLSL
...
Fixes #1286
2020-08-09 22:18:58 +09:00
Hajime Hoshi
07514a37c8
shaderir/glsl: Bug fix: Initialize an array
...
Updates #1285
2020-08-09 04:59:29 +09:00
Hajime Hoshi
a4334c5464
shader: Use arrays at uniform variables
...
Fixes #1274
2020-08-01 17:22:10 +09:00
Hajime Hoshi
ac16564e95
shaderir: Add indexing
...
Fixes #1235
2020-07-29 23:49:57 +09:00
Hajime Hoshi
a0549820fd
shadeir: Add array composite literals
...
Updates #1235
2020-07-29 23:49:54 +09:00
Hajime Hoshi
004b279e4f
shader: Add array initialization
...
Updates #1235
2020-07-29 22:43:51 +09:00
Hajime Hoshi
d9c54bc0d0
shader: Implement an array variable
...
Updates #1235
2020-07-29 02:27:05 +09:00