Yuri Roubinsky
50729e4e35
Fix incorrect shader block parsing
2020-03-20 17:24:00 +03:00
Yuri Roubinsky
a757bd7625
Allow to reassign local variables in shaders
2020-03-20 14:09:43 +03:00
Yuri Roubinsky
523dae6bba
Fix shader TIME auto-completion
2020-03-19 21:42:06 +03:00
Yuri Roubinsky
dbffa2e0bb
Makes shader 'TIME' available in custom functions by default
2020-03-19 17:58:39 +03:00
Yuri Roubinsky
387d6859d7
Show shader method out/inout qualifier in intellisense
2020-03-18 16:06:47 +03:00
Yuri Roubinsky
4709434227
Fix shader crash if passing const values to modf function
2020-03-18 14:07:35 +03:00
Rémi Verschelde
cb282c6ef0
Style: Set clang-format Standard to Cpp11
...
For us, it practically only changes the fact that `A<A<int>>` is now
used instead of the C++03 compatible `A<A<int> >`.
Note: clang-format 10+ changed the `Standard` arguments to fully
specified `c++11`, `c++14`, etc. versions, but we can't use `c++17`
now if we want to preserve compatibility with clang-format 8 and 9.
`Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-17 07:36:24 +01:00
Yuri Roubinsky
7a2c6a8c0e
Enables passing out built-in parameter from parent function in shaders
2020-03-14 10:46:27 +03:00
luz.paz
7bf6e5f773
Fix various typos
...
Found via `codespell`
2020-03-11 13:59:18 -04:00
Yuri Roubinsky
924a9bfd16
Fix shader's step hint range for integers
2020-02-29 09:56:02 +03:00
Juan Linietsky
33b5c57199
Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.
...
- Renames PackedIntArray to PackedInt32Array.
- Renames PackedFloatArray to PackedFloat32Array.
- Adds PackedInt64Array and PackedFloat64Array.
- Renames Variant::REAL to Variant::FLOAT for consistency.
Packed arrays are for storing large amount of data and creating stuff like
meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of
memory. That said, many users requested the ability to have 64 bits packed
arrays for their games, so this is just an optional added type.
For Variant, the float datatype is always 64 bits, and exposed as `float`.
We still have `real_t` which is the datatype that can change from 32 to 64
bits depending on a compile flag (not entirely working right now, but that's
the idea). It affects math related datatypes and code only.
Neither Variant nor PackedArray make use of real_t, which is only intended
for math precision, so the term is removed from there to keep only float.
2020-02-25 12:55:53 +01:00
Juan Linietsky
3205a92ad8
PoolVector is gone, replaced by Vector
...
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are
sugar for `Vector<Type>`.
2020-02-18 10:10:36 +01:00
Yuri Roubinsky
a1da8560ee
Fix shader crash if duplicated struct members created
2020-02-15 22:19:45 +03:00
Rémi Verschelde
d2537407ef
Fix various GCC compilation warnings after Vulkan merge
...
Part of #36132 .
2020-02-14 10:02:31 +01:00
Yuri Roubinsky
41643e268e
Prevent usage 'out' modifier on opaque shader types (textures currently)
2020-02-13 21:02:47 +03:00
Yuri Roubinsky
01de6513ac
Fix bugs in shader swizzling
2020-02-13 18:11:21 +03:00
Yuri Roubinsky
516aa46fe5
Fix shader crash if pass const argument to 'out/inout' parameter
2020-02-13 16:15:08 +03:00
Yuri Roubinsky
6b99bda1e8
Added support for arrays as shader struct members
2020-02-12 17:10:20 +03:00
Yuri Roubinsky
6f162395ff
Implementation of 'struct' for shaders
2020-02-11 20:00:42 +03:00
Juan Linietsky
dd3682e5fe
Modernized default 3D material, fixes material bugs.
2020-02-11 12:01:24 +01:00
Juan Linietsky
6deffa62fb
Several fixes to 3D rendering, and multimesh implementation.
2020-02-11 12:01:22 +01:00
Juan Linietsky
8bbbb97336
Completed material/2D shader support (missing SCREEN_TEXTURE)
2020-02-11 11:53:29 +01:00
Rémi Verschelde
cdce912de7
Merge pull request #35986 from Chaosus/shader_index
...
Allow non-constants for indexing builtin types in shaders
2020-02-07 20:45:57 +01:00
Rémi Verschelde
a4b8dbdc0b
Merge pull request #35142 from clayjohn/GLES2-add-3d-textures
...
Add support for 3D textures to GLES2
2020-02-07 18:36:24 +01:00
Yuri Roubinsky
8469a383ec
Allow non-constants for indexing builtin types in shaders
2020-02-07 18:41:26 +03:00
Yuri Roubinsky
3a70566b15
Prevent shader crash if invalid builtin used after array member accessor
2020-02-07 15:21:15 +03:00
Yuri Roubinsky
2c4367441c
Prevent shader crash when name conflict with "dus" and "__" occured
2020-02-01 12:38:52 +03:00
clayjohn
68915ce20d
Add support for 3D textures to GLES2
2020-01-31 10:01:05 -08:00
Yuri Roubinsky
3473a195fc
Hides high-level functions from GLES2 shader autocompletion
2020-01-23 12:41:21 +03:00
Yuri Roubinsky
4c456ef979
Disallow uint/uvec usage on GLES2 platform
2020-01-20 18:59:35 +03:00
Yuri Roubinsky
3dea1c725e
Clears completion_class in shaders (may cause troubles if not).
2020-01-19 16:35:54 +03:00
Yuri Roubinsky
1eb8d5e142
Added missing form of array constructor in shaders
2020-01-18 11:41:55 +03:00
Yuri Roubinsky
5098232ee6
Disabled array initialization, const array and arr.length in shaders
2020-01-16 11:46:11 +03:00
Yuri Roubinsky
1e154e0947
Fix nested break/return in shader switch statement
2020-01-10 11:57:56 +03:00
Rémi Verschelde
5edd1a27d2
Merge pull request #34671 from Chaosus/shader_hex_support
...
Support for hex numbers in shaders
2020-01-08 10:01:49 +01:00
Rémi Verschelde
a7f49ac9a1
Update copyright statements to 2020
...
Happy new year to the wonderful Godot community!
We're starting a new decade with a well-established, non-profit, free
and open source game engine, and tons of further improvements in the
pipeline from hundreds of contributors.
Godot will keep getting better, and we're looking forward to all the
games that the community will keep developing and releasing with it.
2020-01-01 11:16:22 +01:00
Yuri Roubinsky
99b92c885f
Support for hex numbers in shaders
2019-12-29 12:19:10 +03:00
Rémi Verschelde
2845e6a21a
Merge pull request #34040 from qarmin/unused_variable_more_precise_numbers
...
Removed unused variables, add some constants numbers
2019-12-10 08:25:31 +01:00
Rafał Mikrut
ed1c4bc77d
Removed unused variables, add some constants numbers
2019-12-10 05:13:02 +01:00
Yuri Roubinsky
8b8faf03d5
Fix expressions for global constants in shaders
2019-12-02 19:00:21 +03:00
Marcel Admiraal
6c3be2ca74
Fix Visual Studio throwing C4146 warning.
2019-11-18 15:14:04 +00:00
Yuri Roubinsky
5e44b5be81
Prevents usage of unsupported texture shader types in GLES2
2019-11-03 13:41:15 +03:00
Yuri Roubinsky
6b7f8558d9
Removed switch operator from GLES2 shader back-end
2019-11-02 12:43:32 +03:00
Yuri Roubinsky
1b003f3d64
Prevents shader crash on GLES2 if unsupported built-in has been used
2019-10-31 09:21:44 +03:00
Yuri Roubinsky
76eb486413
Added check if field name in the shader is equal to builtin
2019-10-29 15:37:19 +03:00
Yuri Roubinsky
ef6161532d
Fix shader crash if non-boolean expression inserted into "if"
2019-10-28 08:35:33 +03:00
Hugo Locurcio
701581d1d3
Improve error messages related to shader_type
...
The list of allowed shader types is now displayed if any
`shader_type`-related error is emitted.
This makes it easier to remember which shader types are allowed
when creating a new shader.
2019-10-26 17:43:14 +02:00
Yuri Roubinsky
ada4bcbe30
Fix invalid autocompletion pasting of shader param name
2019-10-08 18:33:22 +03:00
Yuri Roubinsky
76324bec8d
Prevent shader crash if name of variable overrides function name
2019-10-06 20:35:41 +03:00
Yuri Roubinsky
d9087e1b44
Prevent shader crash if function call been used on constant
2019-10-06 18:20:05 +03:00