Commit graph

686 commits

Author SHA1 Message Date
Rémi Verschelde 45842c0ea9
Merge pull request #22627 from akien-mga/gles2-pixel-snap
GLES2: Implement pixel snap 2D option
2018-10-02 19:09:34 +02:00
Rémi Verschelde ac2a4771d5 GLES2: Implement pixel snap 2D option 2018-10-02 15:53:24 +02:00
Rémi Verschelde 8c9c1d6882
Merge pull request #21436 from CptPotato/tonemap-fixes
tonemapping fixes
2018-10-02 15:42:15 +02:00
Rémi Verschelde 4d693fc3f0
Merge pull request #22455 from Calinou/reverse-cull-face-update-light
Update lights when their reverse cull face mode is toggled
2018-10-02 15:23:24 +02:00
Rémi Verschelde 9c93a401b9
Merge pull request #22483 from tagcup/fresnel
Restore the Fresnel term in the BRDF.
2018-10-02 15:18:31 +02:00
Bastiaan Olij a6df366b23 Moving lens distortion shader into drivers and adding GLES2 support 2018-10-02 17:14:43 +10:00
Rémi Verschelde 9258d7b5d0 Fix warnings about uninitialized vars [-Wsometimes-uninitialized]
Fixes the following Clang 7 warnings:
```
drivers/gles3/rasterizer_scene_gles3.cpp:1260:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
drivers/gles3/rasterizer_scene_gles3.cpp:1280:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
drivers/gles3/rasterizer_scene_gles3.cpp:1281:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
drivers/gles3/rasterizer_scene_gles3.cpp:1282:10: warning: variable 'target' is used uninitialized whenever switch case is taken [-Wsometimes-uninitialized]
drivers/gles3/rasterizer_scene_gles3.cpp:1286:5: warning: variable 'target' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
editor/editor_properties_array_dict.cpp:982:15: warning: variable 'change_index' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
editor/editor_properties.cpp:2655:6: warning: variable 'lt' is used uninitialized whenever switch default is taken [-Wsometimes-uninitialized]
editor/settings_config_dialog.cpp:367:11: warning: variable 'current_search_box' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
```
2018-10-01 17:33:08 +02:00
Rémi Verschelde b1b625f4f5 Fix various Clang 7 warnings about unused stuff
Namely:
[-Wunneeded-internal-declaration]
[-Wunused-comparison]
[-Wunused-const-variable]
[-Wunused-function]
[-Wunused-private-fields]

Fixes the following Clang 7 warnings:
```
editor/plugins/script_editor_plugin.cpp:1417:20: warning: function '_find_node_with_script' is not needed and will not be emitted [-Wunneeded-internal-declaration]
editor/scene_tree_dock.cpp:1859:14: warning: function '_find_last_visible' is not needed and will not be emitted [-Wunneeded-internal-declaration]

modules/gdscript/gdscript_parser.cpp:7838:19: warning: equality comparison result unused [-Wunused-comparison]

scene/resources/mesh.cpp:549:35: warning: unused variable '_array_types' [-Wunused-const-variable]
scene/resources/mesh.cpp:563:18: warning: unused variable '_format_translate' [-Wunused-const-variable]

drivers/gles3/rasterizer_scene_gles3.cpp:54:28: warning: unused function 'store_transform2d' [-Wunused-function]

core/io/file_access_network.h:50:6: warning: private field 'ml' is not used [-Wunused-private-field]
core/io/file_access_zip.h:93:14: warning: private field 'archive' is not used [-Wunused-private-field]
core/io/resource_format_binary.h:122:6: warning: private field 'bin_meta_idx' is not used [-Wunused-private-field]
core/message_queue.h:47:9: warning: private field 'mutex' is not used [-Wunused-private-field]
main/tests/test_gui.cpp:63:11: warning: private field 'control' is not used [-Wunused-private-field]
modules/gdscript/gdscript_parser.h:558:7: warning: private field 'completion_static' is not used [-Wunused-private-field]
platform/x11/os_x11.h:148:11: warning: private field 'ip_unix' is not used [-Wunused-private-field]
platform/x11/os_x11.h:180:7: warning: private field 'net_wm_icon' is not used [-Wunused-private-field]
platform/x11/os_x11.h:189:6: warning: private field 'audio_driver_index' is not used [-Wunused-private-field]
platform/x11/os_x11.h:190:15: warning: private field 'capture_idle' is not used [-Wunused-private-field]
servers/physics/body_pair_sw.h:79:6: warning: private field 'cc' is not used [-Wunused-private-field]
servers/visual/visual_server_raster.h:62:7: warning: private field 'draw_extra_frame' is not used [-Wunused-private-field]
```
2018-10-01 17:32:12 +02:00
Rémi Verschelde 686f6ff279 Fix mismatched class/struct definition warnings [-Wmismatched-tags]
Fixes the following Clang 7 warnings:
```
core/object.cpp:44:1: warning: '_ObjectDebugLock' defined as a struct here but previously declared as a class [-Wmismatched-tags]
core/variant_call.cpp:43:1: warning: '_VariantCall' defined as a struct here but previously declared as a class [-Wmismatched-tags]
drivers/gles3/rasterizer_storage_gles3.h:765:2: warning: 'MultiMesh' defined as a struct here but previously declared as a class [-Wmismatched-tags]
editor/editor_node.h:794:1: warning: 'EditorProgress' defined as a struct here but previously declared as a class [-Wmismatched-tags]
modules/bullet/rigid_body_bullet.h:230:17: warning: class 'KinematicUtilities' was previously declared as a struct [-Wmismatched-tags]
modules/bullet/space_bullet.h:60:1: warning: class 'btSoftBodyWorldInfo' was previously declared as a struct [-Wmismatched-tags]
scene/resources/world_2d.cpp:40:1: warning: 'SpatialIndexer2D' defined as a struct here but previously declared as a class [-Wmismatched-tags]
scene/resources/world.cpp:39:1: warning: 'SpatialIndexer' defined as a struct here but previously declared as a class [-Wmismatched-tags]
servers/audio/reverb_sw.cpp:60:1: warning: 'ReverbParamsSW' defined as a struct here but previously declared as a class [-Wmismatched-tags]
thirdparty/bullet/BulletSoftBody/btSoftBody.h:43:1: warning: 'btSoftBodyWorldInfo' defined as a struct here but previously declared as a class [-Wmismatched-tags]
```
2018-10-01 17:02:47 +02:00
Rémi Verschelde 6bfb7944d9 SCons: Remove avoidable defines from main env's CPPPATH
Also finally move freetype to its own env and disable warnings for it.
Still needs some work to fix the awkward situation of the freetype and
svg modules used in scene/ and editor/ respectively.
2018-10-01 11:59:22 +02:00
tagcup 9f4e9fcb81 Optimized GGX G function for GLES2.
Also changed the mapping of anisotropy to match the common definition.
2018-09-30 16:33:50 -04:00
Ferenc Arn e94f6aacee Restore the Fresnel term in the BRDF.
Was uncommented in 65fd37c, mostly likely by mistake since its important.

Also made a few corrections of specular -> specular_blob_intensity (gles2).
2018-09-30 12:17:48 -04:00
Juan Linietsky 0de8309b2c Many fixes to GLES2 renderer, fixed compilation issues in GLES3 shaders. 2018-09-29 13:49:34 -03:00
Juan Linietsky c83742ba86 -Lightmap and lightmap capture support for GLES2
-Added hint to not show some properties when running on low end gfx
2018-09-28 20:33:18 -03:00
Juan Linietsky f2ed26d71e Reflection probe support in GLES2 back-end. 2018-09-28 16:42:47 -03:00
Rémi Verschelde 7b081a7fc8 Fix warnings about unhandled enum value in switch [-Wswitch]
Fixes GCC 5 warnings of the form:

core/io/http_client.cpp:288:9: warning: enumeration value 'STATUS_SSL_HANDSHAKE_ERROR' not handled in switch [-Wswitch]
core/io/marshalls.cpp:806:9: warning: enumeration value 'AABB' not handled in switch [-Wswitch]

Those can be trivial cases where adding a default fallback is the solution,
or more complex issues/hidden bugs where missed values are actually meant
to be handled.
2018-09-27 18:34:30 +02:00
Rémi Verschelde d95bbb8922 Fix warnings about set but unused variables [-Wunused-but-set-variable]
Fixes the following GCC 5 warnings:
```
drivers/gles2/rasterizer_canvas_gles2.cpp:814:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2270:11: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:2673:22: warning: variable 'e' set but not used [-Wunused-but-set-variable]
drivers/gles2/rasterizer_scene_gles2.cpp:715:7: warning: variable 'no_cull' set but not used [-Wunused-but-set-variable]
drivers/gles2/shader_gles2.cpp:693:14: warning: variable 'cc' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_canvas_gles3.cpp:1226:8: warning: variable 'rt_size' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:3039:10: warning: variable 'contrib' set but not used [-Wunused-but-set-variable]
drivers/gles3/rasterizer_scene_gles3.cpp:4504:32: warning: variable 'vp_height' set but not used [-Wunused-but-set-variable]
editor/editor_inspector.cpp:272:9: warning: variable 'guide_color' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:1067:14: warning: variable 'alpha3' set but not used [-Wunused-but-set-variable]
editor/editor_themes.cpp:263:8: warning: variable 'script_bg_color' set but not used [-Wunused-but-set-variable]
editor/plugins/collision_shape_2d_editor_plugin.cpp:326:11: warning: variable 'cpoint' set but not used [-Wunused-but-set-variable]
editor/plugins/mesh_editor_plugin.cpp:72:9: warning: variable 'size' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:471:12: warning: variable 'mpos' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:89:8: warning: variable 'basetype_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:90:8: warning: variable 'type_color' set but not used [-Wunused-but-set-variable]
editor/plugins/shader_editor_plugin.cpp:92:8: warning: variable 'string_color' set but not used [-Wunused-but-set-variable]
modules/visual_script/visual_script_editor.cpp:2521:7: warning: variable 'seq_connect' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:580:12: warning: variable 'styles_count' set but not used [-Wunused-but-set-variable]
platform/android/export/export.cpp:584:12: warning: variable 'styles_offset' set but not used [-Wunused-but-set-variable]
platform/osx/export/export.cpp:464:9: warning: variable 'zerr' set but not used [-Wunused-but-set-variable]
scene/2d/tile_map.cpp:260:10: warning: variable 'tcenter' set but not used [-Wunused-but-set-variable]
scene/3d/light.cpp:166:7: warning: variable 'editor_ok' set but not used [-Wunused-but-set-variable]
scene/3d/navigation.cpp:566:11: warning: variable 'closest_navmesh' set but not used [-Wunused-but-set-variable]
scene/gui/rich_text_label.cpp:869:8: warning: variable 'size' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:705:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:706:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:726:14: warning: variable 'xform' set but not used [-Wunused-but-set-variable]
scene/main/viewport.cpp:727:8: warning: variable 'ss' set but not used [-Wunused-but-set-variable]
scene/resources/material.cpp:430:7: warning: variable 'using_world' set but not used [-Wunused-but-set-variable]
servers/visual/shader_language.cpp:2026:7: warning: variable 'all_const' set but not used [-Wunused-but-set-variable]
servers/visual/visual_server_scene.cpp:1383:28: warning: variable 'z_max_cam' set but not used [-Wunused-but-set-variable]
```

Also fixes two [-Wunused-value] warnings:
```
scene/gui/text_edit.cpp:4405:20: warning: statement has no effect [-Wunused-value]
servers/visual/visual_server_scene.cpp:905:48: warning: value computed is not used [-Wunused-value]
```

Some of those are bugs and need further work, they are identified with
`// FIXME` comments.
2018-09-27 16:25:24 +02:00
Rémi Verschelde e5bbcb8bcf Fix warnings for comparison between signed and unsigned integers [-Wsign-compare]
Also turn off -Wsign-compare warnings in the future, we do not consider them important.

Fixes the following GCC 5 warnings:
```
core/node_path.cpp:279:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:169:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/oa_hash_map.h:314:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/shader_gles2.cpp:985:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles3/rasterizer_storage_gles3.cpp:1075:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/pulseaudio/audio_driver_pulseaudio.cpp:343:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_plugin.cpp:525:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/editor_properties_array_dict.cpp:747:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:2078:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/spatial_editor_plugin.cpp:4096:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
editor/plugins/sprite_editor_plugin.cpp💯20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:122:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:134:77: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/cvtt/image_compress_cvtt.cpp:339:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/etc/image_etc.cpp:222:34: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:242:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/gdnative/register_types.cpp:258:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:200:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:222:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
modules/opensimplex/simplex_noise.cpp:246:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1085:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1489:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/android/export/export.cpp:1623:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:206:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:356:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:406:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
platform/iphone/export/export.cpp:493:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/audio_stream_player_3d.cpp:420:23: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:565:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/audio_stream_sample.cpp:571:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_rb_resampler.cpp:156:36: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```

The following warnings were not fixed, as they implied casting for no gain:
```
core/io/packet_peer.cpp:228:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
core/io/resource_format_binary.cpp:109:11: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/gles2/rasterizer_scene_gles2.cpp:144:57: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
drivers/unix/file_access_unix.cpp:249:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:889:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1020:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:1154:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/3d/voxel_light_baker.cpp:2255:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
scene/resources/bit_mask.cpp:336:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:141:49: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:150:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio/audio_stream.cpp:154:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:86:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
servers/audio_server.cpp:89:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
```
2018-09-27 16:25:23 +02:00
Hugo Locurcio b8bd5d0354
Update lights when their reverse cull face mode is toggled 2018-09-26 21:52:41 +02:00
Rémi Verschelde 60312915dc Fix build after 65fd37c1, using Math_PI
Also fix style in shaders.
2018-09-23 18:26:57 +02:00
Juan Linietsky 65fd37c149 -Rewrote GLES2 lighting and shadows and optimized state changes, did many optimizations, added vertex lighting.
-Did some fixes to GLES3 too
2018-09-23 12:14:50 -03:00
JFonS 8f4f79c767 Fix lighting of rotated particles in 2D
Custom instance transform was not taken into account for normal map
calculation. Also renamed `extra_matrix2` to `extra_matrix_instance` for
more clarity.
2018-09-18 22:58:13 +02:00
JFonS 3cedec5f75 Set uniform default values in inspector 2018-09-13 23:05:33 +02:00
Rémi Verschelde 1a16dabfb5
Merge pull request #21982 from luzpaz/misc-typos
Misc. typos
2018-09-13 10:59:00 +02:00
luz.paz 08bde5b2de Misc. typos
Found via `codespell -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"`
2018-09-12 21:39:17 -04:00
Wilson E. Alvarez 29c9ea69d1
Removed unused function RasterizerSceneGLES3::_copy_to_front_buffer 2018-09-12 17:17:11 -04:00
Rémi Verschelde 277b24dfb7 Make core/ includes absolute, remove subfolders from include path
This allows more consistency in the manner we include core headers,
where previously there would be a mix of absolute, relative and
include path-dependent includes.
2018-09-12 09:52:22 +02:00
Bastiaan Olij 0625f5b546 Fixed a theoretical condition where prealpha prevents lighting 2018-09-08 11:40:06 +10:00
Juan Linietsky 072bf41c03 Ability for Light2D to use a proxy texture, fixes #17067 2018-09-06 17:26:38 -03:00
Rémi Verschelde fc207ba18a
Merge pull request #21782 from eska014/gles3-get-texture-err
Fix missing texture-download error with OpenGL ES
2018-09-05 22:12:28 +02:00
Leon Krause 57eaea571a Fix missing texture-download error with OpenGL ES 2018-09-05 21:22:13 +02:00
Juan Linietsky cf834a22dc Ported CPU particles to 2D 2018-08-29 16:48:55 -03:00
Rémi Verschelde c1f687c681
Merge pull request #21387 from hpvb/fix-15324
Fall back to GLES2 if GLES3 is not working
2018-08-27 16:54:22 +02:00
Juan Linietsky bca706b361
Revert "Fix some 3D texture issues" 2018-08-27 10:12:07 -03:00
Rémi Verschelde 3dc63a710f
Merge pull request #21469 from akien-mga/glsl-clang-format
Style: Enable clang-format on GLSL shaders
2018-08-27 10:12:24 +02:00
alex-poe 5cd00c3780 fix reinhard tonemapper, modified filmic tonemapper, added internal exposure bias 2018-08-27 10:08:38 +02:00
Rémi Verschelde 0ba84b3f23
Merge pull request #21467 from elasota/fix-3d-textures
Fix some 3D texture issues
2018-08-27 09:51:05 +02:00
Rémi Verschelde 4226d56ca9 Style: Enable clang-format on GLSL shaders
As of clang-format 6.0.1, putting the `/* clang-format off */` hint
around our "invalid" `[vertex]` and `[shader]` statements isn't enough
to prevent a bogus indent of the next comments and first valid statement,
so we need to enclose that first valid statement in the unformatted chunk.
2018-08-27 07:34:14 +02:00
elasota 30e20b6278 Partial fixes for 3D texture issues 2018-08-26 20:22:56 -04:00
Hein-Pieter van Braam 08f452d1a9 Fall back to GLES2 if GLES3 is not working
This adds a static is_viable() method to all rasterizers which has to be
called before initializing the rasterizer. This allows us to check what
rasterizer to use in OS::initialize together with the GL context
initialization.

This commit also adds a new project setting
"rendering/quality/driver/driver_fallback" which allows the creator of a
project to specify whether or not fallback to GLES2 is allowed. This
setting is ignored for the editor so the editor will always open even if
the project itself cannot run. This will hopefully reduce confusion for
users downloading projects from the internet.

We also no longer crash when GLES3 is not functioning on a platform.

This fixes #15324
2018-08-26 16:40:46 +02:00
Crazy-P e4af39cbc0 Fixes several resource leaks in ...
- gdscript
- gdscript_compiler
- regex
- android/export
- gles3/rasterizer (scene and storage)
2018-08-26 09:19:02 +08:00
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
Bastiaan Olij 124774860c Fixes issue that a viewport texture doesn't work with particle shader 2018-05-18 22:02:14 +10:00
Bojidar Marinov ee52d12921
Fix a corner-case bug in _copy_texscreen in the gles3 renderer
Fixes #17698
2018-05-15 14:35:46 +03:00
Hein-Pieter van Braam e668757aa9
Merge pull request #14622 from bruvzg/non-rectangular-windows
Experimental support for windows with per-pixel transparency.
2018-05-08 16:44:35 +02:00
Juan Linietsky 3051bb8a81
Merge pull request #17845 from JFonS/disable_spatial_shadows
Added flag on SpatialMaterial to disable shadows
2018-05-07 16:18:25 -03:00
Juan Linietsky f1d2b0ebf9
Merge pull request #18159 from ShyRed/viewportsky
Fix binding of ViewportTexture to Sky
2018-05-07 15:34:13 -03:00
Juan Linietsky b96cd25305
Merge pull request #18495 from Zylann/partial_texture_update
Added partial texture update to VisualServer
2018-05-07 13:20:38 -03:00
Juan Linietsky 35322c0678
Merge pull request #18677 from BastiaanOlij/add_no_blend
Add no-blend canvas item render_mode
2018-05-07 09:44:17 -03:00
Bastiaan Olij 6103c8d7a3 Add no-blend canvas item render_mode 2018-05-07 22:41:12 +10:00
Bastiaan Olij 6f7fefa489 Added option to viewport to keep linear color 2018-05-06 19:28:09 +10:00
Juan Linietsky 3bd0ca2a2d Skeletal deform working 2018-05-04 11:54:21 -03:00
Juan Linietsky b3e4bc562c Skeleton for 2D WIP 2018-05-03 17:29:56 -03:00
Rémi Verschelde 430e45c84a
Merge pull request #16359 from Noshyaar/convert
Particles: fix corrupted scene when saved after convert
2018-05-03 21:24:03 +02:00
Marc Gilleron c755cced83 Added partial texture update to VisualServer 2018-04-29 03:09:49 +02:00
Crazy-P e6deba8d19 Fixes logically dead code (Coverity)
Fixes reported logically dead codes by Coverity

* image.cpp: Doesn't really need any modification. But to remove the bug
report then we have to move the MAX call away from the for loop
statement.

* rasterizer_gles3.cpp: Removes unnecessary elif condition since it is
checked earlier in the function

* collada.cpp: If stamement never reached due to macro ERR_CONTINUE does
the same.

* navigation_mesh.cpp: Variables should always be null - however, also
checked for the very same condition in their function call. Leaving this
for review (whether the function call is necessary or not)

* path_editor_plugin.cpp: If cancel is true, then it should restore the
edited value to the original provided.
http://docs.godotengine.org/en/3.0/classes/class_editorspatialgizmo.html#class-editorspatialgizmo-commit-handle

* spatial_editor_gizmos.cpp: the very condition of i >= 3 is
predetermined in the if case right before it. Thus case 1 is always '1'
and case 2 is always '-1'

* grid_map_editor.cpp: Same as above in spatial_editor_gizmos.cpp

* voxel_light_baker.cpp: Same as above in spatial_editor_gizmos.cpp

* visual_server.cpp: Same as above in spatial_editor_gizmos.cpp

* visual_script_expression.cpp: char '-' is already true in the switch
case mechanism. Thus it can never reach to default case.

* particles.cpp: Case 'PARAM_MAX' is unreachable due to index checking
right before the switch execution.

* shader_language.cpp: Invalid index is handled in switch default case.
`type < TYPE_FLOAT && type > TYPE_VEC4` -> `(type < TYPE_FLOAT || type > TYPE_VEC4`)
Fixes the "always false problem" in TODO comment.
2018-04-21 22:35:23 +08:00
Pieter-Jan Briers 25ba49fd88 Fixes canvas light shaders.
Fixes #16904

Restore more out functionality, fix built-ins.

Requested changes, I think?
2018-04-13 15:18:28 +02:00
ShyRed deca3f18b7 Fix binding of ViewportTexture to Sky
In order to the get the actual rendered image from a ViewportTexture the sky needs to access the proxy texture.
2018-04-12 22:51:35 +02:00
Juan Linietsky b88a16c7ac
Merge pull request #16503 from Chaosus/particlesfix
Fix invalid particle movement when time_scale is zero
2018-04-08 18:15:32 -03:00
bruvzg ddae098dee
Experimental support for windows with per-pixel transparency (macOS, X11 and Windows). 2018-04-07 17:11:45 +03:00
JFonS 9c307d4b6c Added flag on SpatialMaterial to disable shadows 2018-03-29 18:46:42 +02:00
Ben Hickling 314a419511 multiply blend mode fix for spatial materials 2018-03-26 14:23:43 +01:00
Hein-Pieter van Braam bb331d85b8
Merge pull request #17130 from nical/issue-17050
Fix polyline rendering when width <= 1.
2018-03-16 00:04:07 +01:00
Wilson E. Alvarez e9ac87390c Fixed several leaks in VisualServerScene, RasterizerSceneGLES3 and RasterizerGLES3 2018-03-13 00:22:08 -04:00
bruvzg e256f9d4e5
Add GL_ARB_framebuffer_object extension support check and GL_EXT_framebuffer_object fallback for GLES2 (updated GLAD bindings).
Add GL_ARB_debug_output extension support check on all platforms.
2018-03-05 20:49:47 +02:00
Nicolas Silva 20cab06f9a Use GL_LINE_STRIP instead of GL_LINES when drawing polylines. 2018-02-28 23:00:13 -05:00
Poommetee Ketson 38865345d9 Particles: fix corrupted scene when saved after convert (2nd try) 2018-02-24 15:58:17 +07:00
Poommetee Ketson 7a1b7ddf6c Fix error spam when using PanoramaSky without texture 2018-02-22 21:43:17 +07:00
Juan Linietsky 7cd867c3fe 2D Skeletons WORK IN PROGRESS 2018-02-21 17:24:00 -03:00
luz.paz 612ab4bbc6 Fix typos with codespell
Found via `codespell -q 3 --skip="./thirdparty,./editor/translations" -I ../godot-word-whitelist.txt`
Whitelist consists of:
```
ang
doubleclick
lod
nd
que
te
unselect
```
2018-02-21 19:46:06 +01:00
Juan Linietsky 9e3a1e5401 Add base support for 2D meshes in Godot, including Sprite -> Mesh2D conversion. 2018-02-21 09:39:09 -03:00
Rémi Verschelde 1fbb83de2c
Merge pull request #16467 from godotengine/gles3-light-shader-time
using TIME in light shader enables uses_fragment_time
2018-02-20 11:19:14 +01:00
Bojidar Marinov ea57a19b34
Fix a rendering bug with screen_texture 2018-02-19 22:07:38 +02:00
Rémi Verschelde 3ab72da645
Merge pull request #15710 from AndreaCatania/p1
Fixed sky reflection rendering when transparent BG
2018-02-14 16:29:08 +01:00
Chaosus e1c2bde0ec Fix invalid particle movement when time_scale is zero 2018-02-14 16:44:59 +03:00
karroffel bb655856e2 using TIME in light shader enables uses_fragment_time
The GLES3 shader compiler performs certain checks to enable or disable
the usage of certain uniform variables (and with that the set-up of UBOs).

If the `TIME` variable gets used inside the `vertex` function then the
renderer knows that it has to insert that value into the UBO.
The same applies to the `fragment` function.

The `light` function gets executed inside the fragment shader for every
light source that is relevant to the current pixel. If the `TIME` variable
gets used in that function then it needs to be present in the fragment-UBO.
The check for this was missing, so if a shader uses `TIME` inside `light`
but not inside `fragment` then the uniform will not actually be set up.
2018-02-07 11:56:52 +01:00
Hugo Locurcio 84267915f5
Remove a few debugging prints 2018-02-05 11:30:50 +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 92473a9e9e Convert special case RGB10_A2 to RGBA8 when obtaining texture data 2018-01-18 18:05:01 +01:00
Leon Krause cbc194dde6 Fix copy shader in GLSL ES 3.0 2018-01-15 23:46:45 +01:00
Leon Krause e4609acc5d Fix Particles2D in WebGL 2.0 2018-01-15 20:39:17 +01:00
AndreaCatania c34f18acce Fixed sky reflection rendering when transparent BG 2018-01-14 20:28:26 +01:00
Rémi Verschelde e1a0f2bd71
Merge pull request #15636 from mrcdk/fix_canvas_light
Set correct types on a couple variables inside light_compute in canvas.glsl
2018-01-13 01:42:52 +01:00
binbitten de8f43d95d Fix mat2 alignment 2018-01-12 22:26:50 +01:00
MrCdK 408f4cb146 Set correct types on a couple variables inside the canvas.glsl 2018-01-12 22:02:28 +01:00
Juan Linietsky 0041efec1d Fix mat2 alignment 2018-01-12 12:45:16 -03:00
Juan Linietsky f4d603b902 Fix uniform alignment, closes #14962 2018-01-12 12:43:26 -03:00
Juan Linietsky 3a05d974e0 Instance dependency for particles was not being get rid of. Again fixes #15591 2018-01-12 09:12:31 -03:00
Juan Linietsky e3f02b1a1b Properly fix blend equations for both transparent and non transparent framebuffers. Closes #15047 2018-01-11 19:39:47 -03:00
AndreaCatania 252344f706 Fixed graphic artifact caused by anisotropic filter 2018-01-11 12:55:18 +01:00
Rémi Verschelde e49ddf2984
Merge pull request #15555 from BastiaanOlij/clamp_blends
Clamp blend to fix screen space reflections
2018-01-10 13:36:13 +01:00
Bastiaan Olij ebc96195d8 Clamp blend to fix screen space reflections 2018-01-10 23:23:00 +11:00
Rémi Verschelde f1ef2d5183
Merge pull request #15553 from AlmightyScientist/issue-15453
Shader Language: Fixes EXTRA_MATRIX undefined.
2018-01-10 12:46:52 +01:00
AlmightyScientist 4820910648 Shader Language: Fixes EXTRA_MATRIX undefined.
Fixes #15453.
2018-01-10 12:37:28 +01:00
volzhs b6cff1ba69 Fix stretch aspect keep mode
Fix #15407
Fix #15514
2018-01-10 10:49:26 +09:00
volzhs 1c806abdaa Fix shader compile error on Android
**ERROR**: EffectBlurShaderGLES3: Fragment Program Compilation Failed:
23:191: S0001: Type mismatch, cannot convert from 'int' to 'float'
   At: drivers/gles3/shader_gles3.cpp:168:_display_error_with_code() - EffectBlurShaderGLES3: Fragment Program Compilation Failed:
2018-01-09 16:44:56 +09:00
Jerome67000 87bbaddac3 removed unused project setting rendering/quality/depth_prepass/disable 2018-01-08 21:02:53 +01:00
Juan Linietsky 4c23f94af9 properly blend interior and exterior ambient in reflection probes, fixes #14695 2018-01-06 19:34:03 -03:00
Juan Linietsky bfeaf27a3e Properly dispose of instance capture data, fixes #14795 2018-01-06 19:06:04 -03:00
Juan Linietsky d72a32bc54 Use better initialization value for normalmap, fixes #14720 2018-01-06 18:09:11 -03:00
Juan Linietsky 9cf19f8dee Ensure depth reads go via alpha render list, fixes #14759 2018-01-06 17:38:39 -03:00
Juan Linietsky a195f81a6a Improve detection of variable writing in shader, fixes #15177 2018-01-06 09:56:47 -03:00
Juan Linietsky 003f2dab78 Fix dual paraboloid shadow maps, closes #14487 2018-01-05 12:13:52 -03:00
Juan Linietsky 0c86c1ad15 Fixed GIProbe blending, closes #15164 2018-01-05 10:34:31 -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
firefly2442 f066991aa7 found via cppcheck:
remove code that will never run
make definition and declaration names for parameters match
change floats that were being set to bool values
remove pointer that is never used
2018-01-03 21:23:48 -07:00
Rémi Verschelde 72d3c474b0
Merge pull request #15170 from ibrahn/fix-particle-leak
RasterizerStorageGLES3, delete particle objects freed by RID
2018-01-04 01:07:54 +01:00
Juan Linietsky 474523d409
Revert "Add missing image format RGB10A2. Fixes #14964" 2018-01-03 16:43:07 -03:00
Ibrahn Sahir 75c624e119 RasterizerStorageGLES3, delete particle objects freed by RID
fixes #15151
2018-01-03 15:52:47 +00:00
Rémi Verschelde 6d812ad27f
Merge pull request #15051 from binbitten/bug-fixes
Add missing image format RGB10A2. Fixes #14964
2018-01-03 10:17:48 +01:00
Juan Linietsky 2c226e4edf Some fixes to improve precision and speed on Android. Fixes precision issues on Mali and PowerVR. 2018-01-02 18:45:00 -03: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
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 c858dbdc4e Fixed proper texture binding for sprite material, fixes #13987 2017-12-26 15:56:18 -03:00
Juan Linietsky c54927a127 Property apply shader parameters, even when materials are being reused, fixes #14012 2017-12-26 15:13:00 -03:00
Juan Linietsky b411029e31
Merge pull request #14796 from AlmightyScientist/issue-14552
Shader Language: Fix Vertex Lighting artifacts.
2017-12-26 12:46:48 -03:00
Juan Linietsky 2b31155baa Fix sidedness check in material. Also remove SIDE built-in. 2017-12-26 11:09:52 -03:00
binbitten 267bad6b4c Add missing image format RGB10A2. Fixes #14964 2017-12-25 21:01:01 +01:00
MrCdK 1f609b7a82 Set particles emitting to false when particles finish emitting with one-shot enabled 2017-12-23 05:23:41 +01:00
Juan Linietsky 7d0cabe9d3 Change skeleton processing to work on global coordinates, should help fix many import problems from Blender, GLTF2, etc. 2017-12-21 17:36:39 -03:00
Juan Linietsky 3ca06e1184 Propertly deinitialize sampler FBO/Texture, fixes #14586,#14805 2017-12-19 15:26:18 -03:00
Guilherme Silva ffe827ab5a Fix pixel snap not being used in 3.0 2017-12-19 15:18:07 -02:00
Enzo Nocera 6c25eabbc5 Shader Language: Fix Vertex Lighting artifacts.
- When using Direction Lighting along with Vertex Lighting,
  putting a SpatialMaterial Roughness to 1.0 causes artifacts to appear.
  (#14552)

Fixes #14552.
2017-12-18 09:15:28 +01:00
Rémi Verschelde aefa23eac1
Merge pull request #14794 from endragor/remove-debug-logs
Remove debug logs that are of no use to end users
2017-12-18 07:40:01 +01:00
Ruslan Mustakov ec31c4f380 Remove debug logs that are of no use to end users 2017-12-18 13:37:37 +07:00
Rémi Verschelde 8f25a2dc11 Cleanup some #if 0'd code 2017-12-17 15:40:24 +01:00
Hein-Pieter van Braam 34991af553 Don't glBindTexture() on viewports without effects
@reduz said there was another place that needed to be checked for a
similar issue but I have to admit I didn't understand.

This fixes #13337
2017-12-16 23:38:02 +01:00
Juan Linietsky a9ddc8f7cf
Merge pull request #14614 from vitrig/fix-immediate-geometry-acts-strangely
Fix #14564 ImmediateGeometry normals act strangely compared to SurfaceTool
2017-12-16 08:59:27 -03:00
Arnaud PEZEL 6f114c50a7 Fixes built-In "LIGHT" causing fragment compilation error
Add a rename for shader LIGHT built-in, Fix bug #14537
2017-12-14 14:58:13 +01: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 08c8d46593 Fix #14564 ImmediateGeometry normals act strangely compared to SurfaceTool 2017-12-13 07:45:24 +01:00
Rémi Verschelde 663f7e6a61 Fix usage of signed type in skeleton shader
The resulting primitive is drawn as GL_UNSIGNED_SHORT, so uvec4 should be used.
Fixes #12804.
2017-12-10 13:58:36 +01:00
Rémi Verschelde 028f959fb1 PropertyEditor: Filter out resource_local_to_scene
This lets the empty "Global" category disappear again.
Also silence a debug print.
2017-12-10 00:18:10 +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 4d6f8f89ed
Merge pull request #13424 from MillionOstrich/particles-pause-fix
Stop particles resetting on pause.
2017-12-09 16:37:02 +01:00
Juan Linietsky 8c78ccb027 After a lot of trial and error, i think rim lighting implementation is now perfect, closes #13986 2017-12-08 11:09:03 -03:00
Juan Linietsky 8717afbfe1 Added small bit of bias depending on lenght for contact shadows, fixes #12726 2017-12-07 16:19:35 -03:00
Rémi Verschelde 13c2ff9320 Style: Apply new clang-format 5.0 style to all files 2017-12-07 08:02:00 +01:00
Rémi Verschelde d5ca9e2f6f Style: Apply clang-format again on all files
Fixes issues introduced by newer clang-format versions or commits
pushed directly without using the clang-format pre-commit hook.
2017-12-07 08:02:00 +01:00
Juan Linietsky e8494f7ab7 Fixed rim lighting glitch, closes #13340, closes #13986 2017-12-06 14:30:49 -03:00
Unknown fd1b94e307 Improve slang, especially in user-visible parts 2017-12-05 15:41:38 +01: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
Rémi Verschelde 9b9fcb1977 Disable invariant gl_Position to workaround Mesa bug 100316
Fixes #13450, though it would be worth reverting if/when the Mesa bug is fixed.
2017-12-03 15:05:39 +01:00
Juan Linietsky d8953fe737 small fix so shadows dont need to use a separate material for world vertex coords (more perf) 2017-12-01 08:55:21 -03:00
Juan Linietsky 0243803117 Properly take into consideration that VERTEX must be written to in opaque pre pass, does some speed up to scenes using triplanar. 2017-12-01 08:45:36 -03:00
MillionOstrich 9ecde5524d Stop particles resetting on pause. 2017-11-30 17:51:18 +00:00
Scayze b0fb6b1380 Added interpolation modifiers to shaderlang 2017-11-27 16:47:46 +01:00
Rémi Verschelde 4a1d1cbbb4
Merge pull request #13290 from Chaosus/projectionfix
Fix invalid transform when skip_vertex_transform used
2017-11-26 21:31:02 +01:00
Juan Linietsky ea70afc9b4
Merge pull request #13264 from zatherz/feature/projectsettings_limits
Add range to anisotropic filter level
2017-11-26 16:04:36 -03:00
Chaosus 284f8f6d91 Fixed invalid transform when skip_vertex_transform used 2017-11-26 22:02:40 +03:00