Commit graph

69 commits

Author SHA1 Message Date
Yuri Roubinsky 4a3d277623 Add support for integer type in visual shaders 2020-02-26 10:12:06 +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
Yuri Roubinsky 7c1415b99b
Merge pull request #36421 from Chaosus/vs_sort_custom_nods
Refactor node processing in visual shader member dialog
2020-02-21 21:34:03 +03:00
Yuri Roubinsky b78b37ed3f Refactor node processing in visual shader member dialog 2020-02-21 18:34:31 +03:00
Juan Linietsky 3c0059650d Added StringName as a variant type.
Also changed all relevant properties defined manually to StringName.
2020-02-21 14:25:29 +01:00
Juan Linietsky 69c95f4b4c Reworked signal connection system, added support for Callable and Signal objects and made them default. 2020-02-20 08:24:50 +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 bc647393ba Added virtual method to VisualShaderNodeCustom to enable high-end mark 2020-02-13 09:43:43 +03:00
Yuri Roubinsky 6e1187ad2f Added missing '\n' in visual shader expression node code generation 2020-02-03 15:58:58 +03:00
Yuri Roubinsky 9d8b59e86a Added missing '\n' in visual shader custom node code generation 2020-02-01 16:25:34 +03:00
Yuri Roubinsky 45218316c9
Merge pull request #35618 from Chaosus/vs_improvements
Better visual shader code generation
2020-02-01 16:03:48 +03:00
Yuri Roubinsky bfec48abf1 Better visual shader code generation 2020-02-01 15:53:02 +03:00
Yuri Roubinsky b822da00f8 Fix canvas_item light alpha output in visual shaders 2020-01-31 19:34:34 +03:00
Yuri Roubinsky 9705d5587e Hide "control" methods from VisualShaderNodeGroupBase 2020-01-28 10:24:59 +03:00
Yuri Roubinsky 274f1d8610 Hide "editable" property from VisualShaderNodeGroupBase public interface 2020-01-28 09:43:07 +03:00
Yuri Roubinsky 796484d761 Added missing property "size" to VisualShaderNodeGroupBase 2020-01-27 19:18:48 +03:00
Yuri Roubinsky 3479cf4b42 Removed unused method "build" from VisualShaderNodeExpression 2020-01-27 18:24:39 +03:00
Yuri Roubinsky 86cdccebe6 Hide "default_input_values" property in VisualShaderNode. 2020-01-23 11:18:51 +03:00
Yuri Roubinsky a8ab4e3357 Forbid recursive connections in visual shader 2020-01-20 18:15:45 +03: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
Haoyu Qiu 024c25426b Fixes crash when shader inputs/outputs is invalid string 2019-12-10 17:04:18 +08:00
Yuri Roubinsky f5ffc1aedc Fix invalid casting on visual shader sampler 2019-11-04 18:50:33 +03:00
Yuri Roubinsky 8243afb0e9 Added sampler inputs for visual shaders 2019-11-03 17:59:15 +03:00
Yuri Roubinsky 9086e7330f Removes translations from generated visual shader code 2019-10-29 09:26:05 +03:00
Yuri Roubinsky b217babca2 [VShaders] Added sampler port to CubeMap, fixed parsing in expresssion s 2019-10-11 10:36:04 +03:00
Yuri Roubinsky 0ec352213d Removed "rebuild" function from public interface of VisualShader 2019-10-10 12:15:55 +03:00
Yuri Roubinsky fec8da3c5e Makes cube maps to be works in visual shaders 2019-10-09 12:13:53 +03:00
Yuri Roubinsky b11d15d5c3 Makes Texture and TextureUniform in visual shaders to use UV by default 2019-10-03 16:59:49 +03:00
Yuri Roubinsky 31ada3b685 Fix global code in visual shaders if two or more custom nodes are used 2019-10-02 17:13:19 +03:00
Chaosus f14bcd8cc5 Added sampler port type for visual shaders 2019-10-01 13:20:08 +03:00
Rémi Verschelde 4f294b958f doc: Sync classref with current source
Fix a few missing bindings or unspecified argument names and default values.
2019-09-24 11:52:06 +02:00
Chaosus89 bd507739ea Fix formatting error for bool in resulted code of visual shader 2019-09-05 08:32:24 +03:00
Chaosus89 bf3024c172 Added missing OUTPUT_IS_SRGB and FRONT_FACING to visual shaders 2019-09-04 18:24:44 +03:00
Chaosus89 54f0889f20 Fix parsing array indexing symbol in visual shader expression 2019-09-04 16:01:41 +03:00
Chaosus89 a68ea5721f Fix semicolon parsing in visual shader expression 2019-09-01 13:12:33 +03:00
Chaosus89 466a9ffdc6 Fix visual shader expression parsing 2019-09-01 12:14:20 +03:00
Yuri Roubinski 725e5d15ff Added "editable" property to VisualShaderGroupNode 2019-08-22 15:12:18 +03:00
Yuri Roubinski 1e3fb6d760 Fix preview for global expressions in visual shaders 2019-08-20 19:34:09 +03:00
Rémi Verschelde ef37f00525
Merge pull request #31453 from Chaosus/vs_code_preview
Added code preview to visual shader
2019-08-18 17:32:49 +02:00
Yuri Roubinski 808e44df6d Added code preview to visual shader 2019-08-18 17:28:19 +03:00
Yuri Roubinski e3b43771aa Added global expressions to visual shaders 2019-08-18 08:49:56 +03:00
Yuri Roubinski 33e9fce1bb Plugin support for visual shaders 2019-08-14 15:52:27 +03:00
Tomasz Chabora af5e0fff66 Remove ERR_EXPLAIN from scene/* code 2019-08-09 13:54:52 +02:00
Yuri Roubinski 80080f2655 Allow comma prefix to visual shader's expression parser 2019-08-07 13:50:41 +03:00
Chaosus 0727caadd1 Added triplanar uniform texture node to visual shaders 2019-07-12 12:14:34 +03:00
Chaosus 0aec3c3113 Shows menu when dragging connection on empty space in visual shader graph 2019-06-27 10:48:18 +03:00
Chaosus 7bed1a0f21 Fix expression node crashes 2019-06-22 17:41:51 +03:00
Rémi Verschelde 6d16f2f053 Fix error macro calls not ending with semicolon
It's not necessary, but the vast majority of calls of error macros
do have an ending semicolon, so it's best to be consistent.
Most WARN_DEPRECATED calls did *not* have a semicolon, but there's
no reason for them to be treated differently.
2019-06-11 14:49:34 +02:00
Ignacio Etcheverry d426dcabf8 Fix GetTypeInfo error due to missing include 2019-05-27 17:33:25 +02:00
Chaosus 6d38754a06 Fix expression node parsing when input_port + \0 is occured 2019-05-21 19:45:01 +03:00