Commit Graph

2163 Commits

Author SHA1 Message Date
Hajime Hoshi
6fa7b4bb5a shader: Analyze blocks and shadowings 2020-06-01 00:58:33 +09:00
Hajime Hoshi
5de0493294 shader: Implement multiple out params 2020-05-31 19:20:53 +09:00
Hajime Hoshi
afd114e606 shader: Parse function bodies 2020-05-31 19:03:33 +09:00
Hajime Hoshi
91e5dde320 shader: Parse return 2020-05-31 18:01:12 +09:00
Hajime Hoshi
ddba8a911f shader: Parse function signatures 2020-05-31 16:20:36 +09:00
Hajime Hoshi
5ea5dfccfc shader: Remove stmt 2020-05-31 02:23:51 +09:00
Hajime Hoshi
1ede103ce6 shader: Add tests for uniform variables 2020-05-31 02:06:41 +09:00
Hajime Hoshi
e7323e04bf shader: Remove sorting 2020-05-31 01:47:12 +09:00
Hajime Hoshi
8cb70062b7 shader: Remove dumping and original types 2020-05-31 01:25:24 +09:00
Hajime Hoshi
eb1b06c326 graphicscommand: Adjust texels 2020-05-30 22:41:14 +09:00
Hajime Hoshi
e25a6f4d46 graphicsdriver/opengl: Remove isTexture on desktops 2020-05-30 20:56:13 +09:00
Hajime Hoshi
2bdef2e8c4 restorable: Add an explicit way to detect context-lost
isTexture was used to detect context-lost and called every frame.
This was not good for performance.

This change adds a way to notify context-lost from the WebGL
handlers directly, and the package restorable uses it instead of
calling (*Image).isInvalaidated.

Fixes #1175
2020-05-30 20:29:15 +09:00
Hajime Hoshi
117fd61d27 restorable: Do not dispose objects when restoring on browsers
This fix suppresses warnings on the Chrome console.
2020-05-30 19:24:03 +09:00
Hajime Hoshi
1042eb71e0 shaderir: Rename Sampler2D -> Texture2D 2020-05-30 17:48:56 +09:00
Hajime Hoshi
c0cd7ec59c restorable: Update comments 2020-05-30 16:06:22 +09:00
Hajime Hoshi
b2eee7ee8a graphicscommand: Adjust regions for secondory and following images correctly 2020-05-30 15:52:56 +09:00
Hajime Hoshi
915aecb960 graphicscomand: Fix comments 2020-05-30 15:08:28 +09:00
Hajime Hoshi
90e03a65c0 graphicscommand: Update comments 2020-05-30 05:19:49 +09:00
Hajime Hoshi
833a364ba8 testing: Bug fix: Image's size should not be in uniform variables 2020-05-30 05:16:50 +09:00
Hajime Hoshi
f92253487f buffered: Add Shader 2020-05-30 03:36:28 +09:00
Hajime Hoshi
218b6fc172 mipmap: Add Shader 2020-05-29 04:12:41 +09:00
Hajime Hoshi
18c59e44aa shareable: Allow multiple call of (*Shader).Dispose 2020-05-29 03:47:06 +09:00
Hajime Hoshi
9c637c65be shareable: Add Shader 2020-05-29 00:15:42 +09:00
Hajime Hoshi
1c980a16f5 graphicsdriver/opengl: Ignore non-existent uniform locations
Shader users should not have to care about the existence of uniform
variables.

Updates #1168
2020-05-27 11:39:11 +09:00
Hajime Hoshi
f80719ef9a driver: Use slices for uniform variables instead of maps
Fixes #1172
2020-05-26 23:50:11 +09:00
Hajime Hoshi
f14f3b6456 restorable: Fix comments 2020-05-26 00:28:00 +09:00
Hajime Hoshi
7b9cc8deb4 restorable: Add tests to dispose shaders
When a shader is disposed, all the images depending on it should
become stale, i.e., discard its all the rendering history items,
because they cannot be restored due to the lack of data on the GPU.
2020-05-26 00:20:11 +09:00
Hajime Hoshi
8e6f19b37a restorable: Add a test using shaders with multiple sources 2020-05-25 23:57:55 +09:00
Hajime Hoshi
ca73f17dd4 restorable: Bug fix: Fill didn't invalidate its dependencies
Fixes #1170
2020-05-25 23:37:25 +09:00
Hajime Hoshi
1cfc1964bf graphicsdriver/opengl: Bug fix: fmt arguments 2020-05-25 02:36:45 +09:00
Hajime Hoshi
8738d182fb restoreble: Add test with shaders rendering an image
Updates #1168
2020-05-25 02:32:23 +09:00
Hajime Hoshi
85730b433e graphicsdriver: Bug fix: Pass texture natives as uniform variables correctly 2020-05-25 02:31:54 +09:00
Hajime Hoshi
732f288d20 restorable: Add Shader (WIP) 2020-05-25 00:50:01 +09:00
Hajime Hoshi
9bf24ba545 graphicsdriver/opengl: Remove println and add error messages 2020-05-24 23:15:00 +09:00
Hajime Hoshi
fc50f9b0be testing: Refactoring 2020-05-24 22:30:11 +09:00
Hajime Hoshi
155c63ec76 graphicscommand: Move the shader program to testing package 2020-05-24 20:15:07 +09:00
Hajime Hoshi
465d8aa273 graphicscommand: Add IsShaderAvailable for other packages 2020-05-24 19:15:18 +09:00
Hajime Hoshi
c5aba02723 graphicscommand: Update comments 2020-05-24 16:54:28 +09:00
Hajime Hoshi
6506c20f4e graphicscommand: Use an image in the uniform variables 2020-05-24 16:43:08 +09:00
Hajime Hoshi
968c0a9b9a graphicscommand: Bug fix: test failures 2020-05-24 03:04:52 +09:00
Hajime Hoshi
d94b84b8de graphciscommand: Add coments 2020-05-24 02:51:37 +09:00
Hajime Hoshi
a4d419bab1 graphicscommand: Merge DrawTriangles and DrawShader 2020-05-24 02:36:09 +09:00
Hajime Hoshi
3ed9f8ee3b shaderir: Update comments 2020-05-24 02:07:57 +09:00
Hajime Hoshi
3306a957ba graphicscommand: Skip the shader test on browsers
Updates #482
2020-05-23 22:41:06 +09:00
Hajime Hoshi
521f9dcac5 graphicsdriver/opengl: Bug fix: deleted a wrong shader program
Updates #482
2020-05-23 22:40:49 +09:00
Hajime Hoshi
1a0d92267b driver: Add shader API and implement it on OpenGL
Updates #482
2020-05-23 22:09:12 +09:00
Hajime Hoshi
14e90a34aa shaderir: Add more builtin functions 2020-05-23 22:01:10 +09:00
Hajime Hoshi
f38ca35608 shaderir: Remove attribute variables from fragment shaders 2020-05-23 19:06:44 +09:00
Hajime Hoshi
125f85effe shaaderir: Use gl_FragColor 2020-05-23 18:18:22 +09:00
Hajime Hoshi
da4d5b1338 shaderir: Add more builtin functions 2020-05-23 18:07:32 +09:00