Commit graph

495 commits

Author SHA1 Message Date
Juan Linietsky 62233423c7 Fix generation of env map, closes #18880 2018-08-24 13:31:31 -03:00
Rémi Verschelde 1ae7a78d8b
Merge pull request #21364 from akien-mga/shaders-style
Style: Fix code formatting in GLSL shaders
2018-08-24 15:17:38 +02:00
Juan Linietsky cf217627c7 Added a more minimal test to avoid crash in #20677 but I dont think this is the cause 2018-08-24 10:15:16 -03:00
Rémi Verschelde 52466d57e9 Make some debug prints verbose-only, remove others 2018-08-24 14:59:01 +02:00
Rémi Verschelde 1b6d75a599 Style: Fix code formatting in GLES3 shaders 2018-08-24 13:42:18 +02:00
Rémi Verschelde de59fe04e7 Add print_verbose to print to stdout only in verbose mode
Equivalent of the cumbersome:
if (OS::get_singleton()->is_stdout_verbose())
	print_line(msg);
2018-08-24 09:23:20 +02:00
elasota 35f6ba5c5d BPTC support 2018-08-21 22:56:04 -04:00
Nick Hahn 66eba18969 Fix handling of normals that approach 1 2018-08-12 12:45:43 +02:00
Juan Linietsky b67f982723
Merge pull request #20681 from DavidSichma/master
Keeping track of discard
2018-08-08 09:54:59 -03:00
Hugo Locurcio 31c12f05c4
Tweak the default SpatialMaterial properties
Roughness is now set to 1 by default and albedo is now white,
even on meshes that do not have any materials defined.

This means there is no longer a visual difference between a
mesh with no materials defined and a mesh with a default
SpatialMaterial defined.
2018-08-07 17:04:30 +02:00
Juan Linietsky edde52c8de Added proper import support for 3D and Array textures 2018-08-06 14:56:06 -03:00
David Sichma c101dd5fa6 Keeping track of discard
Shader compilation now keeps track of the discard key word.

Previously only variables were monitored. But discard, which needs
special treatment in some cases, went unnoticed by the compiler as
discard is not a variable but a flow control.

This commit adds monitoring for discard.
2018-08-02 21:55:02 +02:00
Thomas Herzog b4d3f541e7 add 3D textures 2018-07-30 12:20:27 +02:00
Juan Linietsky 7b63c6323d Clear color was not correctly being set, fixes #4939 2018-07-29 15:09:42 -03:00
Hein-Pieter van Braam 0e29f7974b Reduce unnecessary COW on Vector by make writing explicit
This commit makes operator[] on Vector const and adds a write proxy to it.  From
now on writes to Vectors need to happen through the .write proxy. So for
instance:

Vector<int> vec;
vec.push_back(10);
std::cout << vec[0] << std::endl;
vec.write[0] = 20;

Failing to use the .write proxy will cause a compilation error.

In addition COWable datatypes can now embed a CowData pointer to their data.
This means that String, CharString, and VMap no longer use or derive from
Vector.

_ALWAYS_INLINE_ and _FORCE_INLINE_ are now equivalent for debug and non-debug
builds. This is a lot faster for Vector in the editor and while running tests.
The reason why this difference used to exist is because force-inlined methods
used to give a bad debugging experience. After extensive testing with modern
compilers this is no longer the case.
2018-07-26 00:54:16 +02:00
Rémi Verschelde e38051970c
Merge pull request #20448 from volzhs/duplicated-code
Remove duplicated codes
2018-07-25 22:20:47 +02:00
Rémi Verschelde 237148e80f
Merge pull request #18368 from Gamblify/RasterizerEngineSync
sync rasterizers with engine
2018-07-25 20:33:37 +02:00
volzhs 946be8be50 Remove duplicated codes 2018-07-25 23:34:25 +09:00
AndreaCatania 17ebbfb56d Implemented Soft body
- Soft Body Physics node
- Soft Body Rendering
- Soft body Editor
- Soft body importer
2018-07-23 20:50:23 +02:00
AndreaCatania fbf3ad2841 Added some API to visual server so from control VRAM buffer is more easy 2018-07-23 12:59:27 +02:00
Juan Linietsky 4b549faaab transmission was broken, fix was made. Also fixed treshold. 2018-07-22 14:04:11 -03:00
Juan Linietsky ad88979841 Fix opaque pre pass not casting shadows 2018-07-22 13:18:27 -03:00
Rémi Verschelde 00dfc9c8eb Shader lang: Properly assign INSTANCE_ID to gl_InstanceID
Note that gl_InstanceID is not supported in OpenGL ES 2.0,
so in the gles2 backend we assign it to 0.

Also clean up some duplicates/commented out code.
Fixes #20088.
2018-07-22 14:26:46 +02:00
Juan Linietsky c69de2ba46 -Project/Editor settings now use new inspector
-Project/Editor settings now show tooltips properly
-Settings thar require restart now will show a restart warning
-Video driver is now visible all the time, can be changed easily
-Added function to request current video driver
2018-07-19 19:02:04 -03:00
Alex Roman 2ce1118faa Add disable ambient light flag to shaders and materials 2018-07-17 21:30:43 +02:00
Max Hilbrunner 277793439a
Revert "Fix #19507 Not emitted particles affects performance" 2018-07-17 16:52:13 +02:00
Max Hilbrunner 4b626dc114
Merge pull request #19764 from malbach/godot_malbach
Fix #19507 Not emitted particles affects performance
2018-07-17 16:47:41 +02:00
Juan Linietsky de910f8c26 Finally figured out how to implement AnimatedTexture properly. 2018-07-16 11:43:49 -03:00
Max Hilbrunner ed55fb538a
Merge pull request #20096 from CptPotato/19163-aces-whitepoint
Fix missing whitepoint for ACES tonemapping
2018-07-12 18:02:53 +02:00
alex-poe 37357c86cd reformatted and restructured tonemap.glsl 2018-07-12 17:10:00 +02:00
Max Hilbrunner 40f38216cf
Merge pull request #19707 from toger5/fix_clipping_vflip
fix clipping with v_flip fixes: #18600
2018-07-12 05:05:56 +02:00
alex-2b17x4 7fe75bb43b added 'whitepoint' to ACES tonemapping 2018-07-11 15:59:14 +02:00
karroffel 3d33da19bd fix wrong loop condition in MultiMesh allocation 2018-07-10 23:13:59 +02:00
Juan Linietsky 7dcaabaf19 Support for CPU based particles, which aids compatibility with OpenGL ES 2.0 2018-07-06 20:21:42 -03:00
JFonS 4421a6661d Move light 2D rotation to vertex shader 2018-07-05 11:12:04 +02:00
JFonS ac18444c7e Fix regression of 2D light height 2018-07-04 23:31:27 +02:00
Rémi Verschelde dfc4ca9f6a
Merge pull request #19807 from JFonS/fix_light_vec_rotation
Fix rotation of 2D lights
2018-07-04 15:15:23 +02:00
Rémi Verschelde 92bfde531c
Merge pull request #19786 from JFonS/correct_normal_scaling
Add render mode to ensure correct normals when using non-uniform scaling
2018-07-04 15:09:59 +02:00
Max Hilbrunner 5af08779b9
Merge pull request #19682 from dragmz/particles_redraw_fix
Prevent redraws when an inactive Particles2D node is present
2018-07-03 16:13:33 +02:00
Juan Linietsky 7fc2367508 Added ability for SSAO to affect AO textures too 2018-07-02 16:50:52 -03:00
malbach cef8d355d2 Fix #19507 Not emitted particles affects performance 2018-06-25 18:17:28 +02:00
JFonS c8cf71753c Add render mode to ensure correct normals when using non-uniform scaling 2018-06-21 00:12:12 +02:00
Marcin Zawiejski f6f7ada91b prevent redraws when an inactive Particles2D node is present 2018-06-20 22:44:11 +02:00
JFonS e9a3cf8feb Fix rotation of 2D lights 2018-06-19 11:24:51 +02:00
toger5 b4b7ca89f5 fix clipping with v_flip fixes: #2929 2018-06-16 22:55:21 +02:00
Gustav Lund 35eb7f2d6a Rasterizers are now in sync with engine
The rasterisers (both GLES3 and GLES2) were calculating their own frame delta time
This fix lets the rasterizers get the frame delta through the draw call
That way any regulations to the frame step from the main script will not cause particle systems to process at a different step than the rest of the Engine.

Remove unused rasterizer storage variable

frame.prev_tick variable were not used anywhere and has been removed
2018-06-05 16:33:02 +02:00
Bastiaan Olij 6c649bd785
Merge pull request #19029 from BastiaanOlij/more_viewport_texture_fixes
Fixed generating radiance texture when using viewport texture for sky
2018-05-27 19:53:10 +10:00
Max Hilbrunner 98dd2b3c79
Merge pull request #18884 from bojidar-bg/17698-screentex-bug
Fix a corner-case bug in _copy_texscreen in the gles3 renderer
2018-05-26 18:20:15 +02:00
Bastiaan Olij f4638d16f1 Fixed generating radiance texture when using viewport texture for sky 2018-05-19 12:37:26 +10:00
bruvzg 6f0a83b681
Fix UWP build after #14622. 2018-05-18 19:29:24 +03:00