Commit Graph

75 Commits

Author SHA1 Message Date
Jérôme Leclercq a1b6f51398 Minor fixes 2022-02-21 20:46:37 +01:00
Jérôme Leclercq 3f7815175b Shader: Add EliminateUnusedPassVisitor and use it when optimizing 2022-02-18 13:06:47 +01:00
Jérôme Leclercq 402e16bd2b Shader: Handle type as expressions 2022-02-17 13:23:56 +01:00
Jérôme Leclercq b0a3941f4e Add Phong lighting (WIP) 2022-01-11 19:47:29 +01:00
Jérôme Leclercq 756fd773a9 Shader: Add support for numerical fors 2022-01-06 20:38:55 +01:00
Jérôme Leclercq 4fe44339c5 Shader: Add support for for-each statements and improve arrays 2022-01-02 22:02:11 +01:00
Jérôme Leclercq 1f15328fdd Shader: Add initial support for arrays 2022-01-01 23:01:31 +01:00
SirLynix 89c7bbf197 Update copyright date 2022-01-01 15:30:09 +01:00
Jérôme Leclercq f98ea6b0ca Shader: Add full support for scalar swizzle 2021-12-25 19:13:08 +01:00
Jérôme Leclercq 157e74b016 Shader/GlslWriter: Reorder function implementations 2021-12-25 14:02:22 +01:00
Jérôme Leclercq 837b72f68e Shader: Rework Swizzle and add support for swizzle store in SPIRV 2021-12-21 14:30:47 +01:00
Jérôme Leclercq 0f9060c45b Shader: Add support for while loops 2021-12-16 23:10:58 +01:00
Jérôme Leclercq 0aec863300 Shader: Add support for exp intrinsic 2021-12-05 17:02:46 +01:00
Jérôme Leclercq d040cc6767 Shader/GlslWriter: Fix gl_Position.z remapping 2021-11-21 19:04:09 +01:00
Lynix 57d39f7eeb Shader/GlslWriter: Rename scaleZPosition to remapZPosition 2021-11-21 16:15:56 +01:00
Jérôme Leclercq c85263c9e7 Shader/GlslWriter: Add depth fix (from [0;1] to [-1;1] 2021-11-14 13:00:15 +01:00
Jérôme Leclercq ed7ab31933 Apply copyright fix to all files 2021-10-26 14:31:35 +02:00
Jérôme Leclercq cb716e5da5 Fix OpenGL version check 2021-10-24 15:25:17 +02:00
Jérôme Leclercq 0442db1c53 Shader: Add support for compound operators 2021-09-24 15:39:03 +02:00
Jérôme Leclercq 02a12d9328 Handle shader options of any type 2021-09-03 19:33:41 +02:00
Jérôme Leclercq 8db8533300 Fixes a lot of warnings and move math enums to enum classes 2021-08-19 20:27:20 +02:00
Jérôme Leclercq 3a31c77524 Shader: Rename ConstantExpression to ConstantValueExpression 2021-07-08 15:22:08 +02:00
Jérôme Leclercq a895e553d4 Graphics: rework ubershaders to prevent duplicate shaders modules
Also rename all remaining conditions to options
2021-07-08 14:52:39 +02:00
Jérôme Leclercq 1f6937ab1b Shader: Implement const if and const values 2021-07-07 22:38:24 +02:00
Jérôme Leclercq d679eccb43 Shader: Fix struct indexes in case of disabled field 2021-07-07 22:38:24 +02:00
Jérôme Leclercq 72edff30c7 Shader: Add support for logical and/or 2021-07-07 22:38:24 +02:00
Jérôme Leclercq f9af35b489 Shader: Attribute can now have expressions as values and struct fields can be conditionally supported 2021-07-07 22:38:24 +02:00
Jérôme Leclercq ae73f68d8c Shader: Fix variable shadowing with GLSL 2021-07-06 11:43:47 +02:00
Jérôme Leclercq c42d18243b Shader: Fix identifiers sanitization 2021-07-03 13:53:00 +02:00
Jérôme Leclercq dfa46ebaa5 Fix shader generation unit tests 2021-06-16 16:50:00 +02:00
Jérôme Leclercq f22b501e25 Add initial support for shader binding sets (WIP) 2021-06-16 16:50:00 +02:00
Jérôme Leclercq 815a7b0c62 Replace const ShaderAst::StatementPtr& by ShaderAst::Statement& in input 2021-06-16 16:50:00 +02:00
Jérôme Leclercq 50bf26d92f Shader: Add support for pow intrinsic 2021-06-05 01:29:36 +02:00
Jérôme Leclercq 4465e230af Shader/NZSL: Add support for array indexing 2021-06-01 16:22:41 +02:00
Jérôme Leclercq 0f3c0abb96 Shader/ShaderAst: Rename AccessMember* to Access* 2021-06-01 12:38:17 +02:00
Jérôme Leclercq 16e2f5f819 Shader: Add support for depth_write and early_fragment_tests attributes (+ FragDepth builtin) 2021-06-01 12:32:24 +02:00
Jérôme Leclercq c2b61b6732 A lot of fixes 2021-05-28 22:58:40 +02:00
Jérôme Leclercq 58fe411750 Shader/GlslWriter: Move function forward declaration before functions using them
Because of some weird ass shit bug in nvidia driver if functions were forward declared before declaration of UBO they were using
2021-05-26 22:21:57 +02:00
Jérôme Leclercq e7a2573221 Shader: Add support for FragCoord builtin 2021-05-26 22:17:07 +02:00
Jérôme Leclercq ac57b3fbf4 Shader/GlslWriter: Accepts mono-functions shader without specifying entry points 2021-05-25 10:40:07 +02:00
Jérôme Leclercq cce32a64d4 Upgrade Utility 2021-05-25 10:40:07 +02:00
Jérôme Leclercq f6fd996bf1 Shader: Add support for custom functions calls (and better handle intrinsics) 2021-05-22 13:37:54 +02:00
Jérôme Leclercq a7235ab02d Shader: Add support for max/min intrinsic 2021-05-19 20:31:26 +02:00
Lynix 61d082e61b Shader/ShaderWrite: Add optimize bool 2021-05-16 23:08:36 +02:00
Lynix 525f24af2e Shader/ShaderLang: Add support for Unary operators 2021-05-16 23:07:25 +02:00
Jérôme Leclercq 51ecff2912 ShaderLang: Add support for length intrinsic 2021-05-14 02:02:12 +02:00
Jérôme Leclercq 044195b209 Minor fixes 2021-04-20 18:18:27 +02:00
Jérôme Leclercq 2238bbfa0c Shader: Add AstReflect 2021-04-20 18:18:27 +02:00
Jérôme Leclercq 1a8599ba29 Shader: Add sanitization of identifiers (fixes GLSL generation) 2021-04-20 18:18:27 +02:00
Jérôme Leclercq 87ce2edc6e Shader: Add initial support for options (WIP) 2021-04-20 18:18:27 +02:00