Commit Graph

385 Commits

Author SHA1 Message Date
Hein-Pieter van Braam-Stewart 95fe095a5a Don't try to statically allocate 2x 8193 pointers
Maximum stack size is only 8KiB, this will try to allocate 8193 *
sizeof(void*) * 2 = 131088 bytes on the stack. This causes a crash in
some cases.

(cherry picked from commit c52f890626)
2019-07-03 17:02:13 +02:00
Chaosus ebe8bcd0cf Added FRAGCOORD to spatial light processing
(cherry picked from commit 37f5cc5b63)
2019-07-03 13:59:17 +02:00
Chaosus 92fb290f69 Added conversions between matrixes in shaders
(cherry picked from commit ca0a6c3fca)
2019-07-03 13:35:41 +02:00
Overblob 854fc3cb97 Fixed error due to bad cursor handling when parsing shader code
Fixed completion error log thrown on "no auto-completion found" for typings with no completion.

(cherry picked from commit 7a74d310aa)
2019-07-03 13:07:45 +02:00
Josh Taylor b1bb7e48ca Changed minimum visible viewport size
When the viewport's size.y becomes lower than 2, the storage->frame.current_rt->effects.mip_maps[0].sizes Vector during rendering becomes empty, resulting in crashes in at least GLES3. This is a temporary fix to stop rendering a viewport when its size is below 2 rather than below 1.

(cherry picked from commit 892a4b175a)
2019-07-03 13:01:02 +02:00
Oliver Rausch 2107517f2f Fix return type of isnan and isinf in the shader language
(cherry picked from commit 2368b31e1e)
2019-07-03 12:33:25 +02:00
Markus Ewald 3d5c5c28d5 Implement VisualServerScene::instance_set_extra_visibility_margin() method to actually apply extra culling margin and mark instance AABB dirty
(cherry picked from commit fc166f3ee1)
2019-07-03 12:27:24 +02:00
Rémi Verschelde 0eab0d9343 Update copyright statements to 2019
Happy new year to the wonderful Godot community!
2019-01-03 11:41:35 +01:00
Juan Linietsky 4bcea9de74 Remove pointless check for no texture, fixes #7298
(cherry picked from commit 95a9e51975)
2018-11-28 10:27:41 +01:00
Hugo Locurcio 403f7dc35f Change ".." punctuation for "..." in editor strings (#16507)
(cherry picked from commit 1c419531a0)
2018-06-05 21:42:33 +02:00
JFonS 4de1d0905a Fix vector reduction in shader language
(cherry picked from commit 5b50685b38)
2018-05-13 23:02:32 +02:00
Bastiaan Olij dfe6d42a01 A few fixes on the ARVR Server
(cherry picked from commit 5356423377)
2018-04-29 15:05:38 +02:00
robfram 3cc2eee4e8 Fix crash in `canvas_item_add_polyline` when passing more points than colors
When `p_points.size() > p_colors.size()`, it crashed with invalid
array access to `p_colors`. Also, when `p_colors` was an empty
`Vector` it crashed due a missing `else` checking the `size`
condition, as the code handling that special case exists.

This PR fixes the missing `else` for `p_colors.size == 0` and,
following the `canvas_item_add_multiline` spirit, it only uses the
first color for the whole polyline if points and colors differ in
size.

Fix #17621.

(cherry picked from commit 8eedb2afe2)
2018-04-28 17:45:25 +02:00
JFonS 43dcf23990 Hinted shader uniforms can have a default value
(cherry picked from commit 479f531635)
2018-04-28 17:16:07 +02:00
Pieter-Jan Briers 0d2a2a9300 Fixes canvas light shaders.
Fixes #16904

Restore more out functionality, fix built-ins.

Requested changes, I think?

(cherry picked from commit 25ba49fd88)
2018-04-28 16:03:23 +02:00
Chaosus 3503ee4be6 Fix invalid mix function overload
(cherry picked from commit 97bef8d908)
2018-04-15 01:13:38 +02:00
Saracen 2f7aa6c2aa Make the shader token names consistent.
(cherry picked from commit b095e21d91)
2018-04-15 01:07:37 +02:00
Wilson E. Alvarez 9567297a66 Fixed several leaks in VisualServerScene, RasterizerSceneGLES3 and RasterizerGLES3
(cherry picked from commit e9ac87390c)
2018-03-29 00:29:06 +02:00
Chaosus 06a60bb6ef Fix floatBitsToUint function
(cherry picked from commit c6b6af7bb5)
2018-03-03 14:54:52 +01:00
Chaosus a86829211a Added missing shader functions
(cherry picked from commit 8f04a13c98)
2018-02-22 00:02:52 +01:00
Paolo Perkovic 7de47fbabb Fix inconsistencies and typos in argument names
(cherry picked from commit 08d4bfacaf)
2018-02-04 20:10:13 +01:00
Rémi Verschelde 9f479f096c Fix typos in code and docs with codespell
Using v1.11.0 from https://github.com/lucasdemarchi/codespell
2018-01-18 22:01:42 +01:00
binbitten bccb4840c8 Fix wrong viewport transparent-bg 2018-01-18 19:11:07 +01:00
Juan Linietsky bfeaf27a3e Properly dispose of instance capture data, fixes #14795 2018-01-06 19:06:04 -03:00
Rémi Verschelde e4213e66b2 Add missing copyright headers and fix formatting
Using `misc/scripts/fix_headers.py` on all Godot files.
Some missing header guards were added, and the header inclusion order
was fixed in the Bullet module.
2018-01-05 01:22:23 +01:00
Rémi Verschelde 0b07d453f7
Merge pull request #15251 from binbitten/fix-assign-vardecl
Fix premature declaration of shader variables created with assignment
2018-01-04 15:17:10 +01:00
Rémi Verschelde f9f6f250e6
Merge pull request #15191 from Jerome67000/z_renaming
renames "z" Node2D property to "z_index"
2018-01-04 00:41:45 +01:00
Razah e3c9a7ed4f Fix broken Info.plist after copyright update
Fixes #15293.
+ related misc fixes by @akien-mga.
2018-01-03 17:10:07 +01:00
Jerome67000 42ae3525a3 #15078 renamed "z" -> "z_index" property in Node2D 2018-01-03 13:02:26 +01:00
binbitten f141bafba3 Fix premature declaration of shader variables created with assignment 2018-01-03 07:23:04 +01:00
Rémi Verschelde b50a9114b1 Update copyright statements to 2018
Happy new year to the wonderful Godot community!
2018-01-01 14:40:47 +01:00
binbitten 9b2283382e Fixed wrong highlighted line when erroring and using single-line comments, fixes #15167 2017-12-29 19:32:21 +01:00
Noshyaar 5c636875e4
Merge pull request #14971 from mrcdk/particles_emitting
Set particles emitting to false when particles finish emitting with one-shot enabled
2017-12-27 10:45:36 +07:00
Juan Linietsky 2b31155baa Fix sidedness check in material. Also remove SIDE built-in. 2017-12-26 11:09:52 -03:00
MrCdK 1f609b7a82 Set particles emitting to false when particles finish emitting with one-shot enabled 2017-12-23 05:23:41 +01:00
Rémi Verschelde 8f25a2dc11 Cleanup some #if 0'd code 2017-12-17 15:40:24 +01:00
Enzo Nocera 8e2a1ffd6e Shader Language: Add in-for declared variables within for-block scope. 2017-12-17 01:43:59 +01:00
Juan Linietsky 652c98a7be Add epic hack so vsync can be toggled in run-time from script. Fixes #14458.
Call needs to be routed via visual server to reach the proper thread.
2017-12-16 17:11:02 -03:00
Juan Linietsky e946fb8cb0 Made built-in identifiers properly constant in shaders. Fixes #14449, closes #14629 2017-12-15 18:24:30 -03:00
Juan Linietsky f3ad14224e -Add lightmapper
-Fixes to unwrapper (remove degenerates), makes Thekla not crash
-Added optional cancel button in EditorProgress
-Added function to force processing of events (needed for cancel button)
2017-12-14 09:01:27 -03:00
Przemyslaw Czarnota c3c1d119ec Fix #14429 GIProbe does not work with SpotLights 2017-12-09 20:57:28 +01:00
Juan Linietsky 65fb961b8b -Ability to and unwrap lightmap coordinates on import
-Added unwrap functionality to Mesh
-Ability to display and debug mesh UVs
-Added multiline draw, so it's easier and faster to draw UVs
-Many fixes to SurfaceTool
-Fixes to Thekla Unwrap, but it's a piece of ass and it keeps crashing. Will have to go away
2017-12-09 14:18:14 -03:00
Rémi Verschelde ccef401700
Merge pull request #13341 from scayze/interp_v2
Added interpolation qualifiers to shaderlang
2017-12-09 18:12:14 +01:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Juan Linietsky 0bc573635c Fixes to some thread safety situations to avoid GIProbe from freezing on save. Fixes #13338 2017-12-06 18:06:34 -03:00
Juan Linietsky 431dfc1458 Attempt to see if this can solve the problem with #13338 2017-12-06 16:41:19 -03:00
Juan Linietsky d438ac0aed -Implemented Proxy Textures (needed to solve the problem with ViewportTexture)
-Properly use hierarchy to initialize resources local to scene (solves problem of GUI in 3D)
2017-12-04 15:56:17 -03:00
Scayze b0fb6b1380 Added interpolation modifiers to shaderlang 2017-11-27 16:47:46 +01:00
Rémi Verschelde 8dc89e787c
Merge pull request #13294 from RaXaR/master
Added overloads of vector parameters for shader Trig functions.
2017-11-27 00:58:14 +01:00
RaXaR b932d8c37a Added overloads of vector parameters for shader Trig functions.
Ammend: Removed whitespace from blank lines.
Ammend2: Removed extra spaces in an attempt to make Clang happy. :)
2017-11-27 01:18:45 +02:00