Commit Graph

138 Commits

Author SHA1 Message Date
Jérôme Leclercq
68708c54f7 Minor stuff 2021-10-04 09:24:42 +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
ea49f56530 Shader/LangParser: OCD fix 2021-09-23 17:49:36 +02:00
Jérôme Leclercq
3af1cd80ee Shader/ShaderLangParser: Fix > and >= parsing 2021-09-05 15:49:05 +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
b31c56c642 Fix compilation with Clang 2021-08-21 15:27:32 +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
ac08afe9f1 Shader: Add missing ! and != parsing 2021-08-19 18:47:11 +02:00
Jérôme Leclercq
a5b71f33b9 Shader: Fix support of conditional functions 2021-08-19 18:47:11 +02:00
Jérôme Leclercq
863fb3ea7e Shader: Fix optimization issues
Moving the unique_ptrs but failing to optimize the expression could cause issues
Also the constant query callback defaulted to ConstantValue (without const ref), thanks auto.
2021-07-11 11:17:48 +02:00
Jérôme Leclercq
996b5ef85c Shader: Rename ConstantIndexExpression to ConstantExpression 2021-07-08 15:24:22 +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
d3e0d8a39f Shader: Replace select_opt by const_select 2021-07-08 10:53:11 +02:00
Jérôme Leclercq
838063c8b6 Shader: Fix nested blocks parsing 2021-07-08 10:52:29 +02:00
Jérôme Leclercq
309fd547e1 Fix compilation errors and warnings 2021-07-07 22:38:24 +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
749b40cb31 Shader: Improve variable name sanitization 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
f9b453bd2b Shader: Add support for branching and discard statements 2021-07-03 19:13:22 +02:00
Jérôme Leclercq
c42d18243b Shader: Fix identifiers sanitization 2021-07-03 13:53:00 +02:00
Jérôme Leclercq
e896695179 Shader/LangWrite: Fix code generation with methods 2021-06-20 14:08:56 +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
da664d51ba Shader/LangWriter: Fix texture sampling output 2021-06-05 01:29:48 +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
9ee3a0d6be DeferredShading: Add bloom 2021-06-01 20:28:19 +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
465837ff12 Renderer: Add support for cubemaps 2021-06-01 12:30:37 +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
874fb3542e Convert all remaining enums to enum classes (!) 2021-05-25 10:40: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
709604c070 Shader/Spirv: Fix OpFunctionParameter type 2021-05-22 16:45:57 +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
Jérôme Leclercq
0339ea346f Shader: Fix unary plus/minus on vector 2021-05-19 20:30:29 +02:00
Jérôme Leclercq
82d80a68ff Shader: Cleanup optimizer 2021-05-18 17:25:48 +02:00
Jérôme Leclercq
a002d5c210 Shader: Add constant cast optimization 2021-05-18 17:25:37 +02:00
Lynix
b0b1acf497 Shader: Fix LangWriter 2021-05-17 17:43:38 +02:00
Lynix
ccccbfe0ad Shader/SpirV: Fix UInt32 support 2021-05-16 23:14:39 +02:00
Lynix
61d082e61b Shader/ShaderWrite: Add optimize bool 2021-05-16 23:08:36 +02:00