Commit graph

204 commits

Author SHA1 Message Date
Juan Linietsky
0cac32910a -Restored support for Canvas BG mode on Environment
-Improved ease of use of WorldEnvironment (no longer extends Spatial)
-2D editor viewport can now work in HDR!
2017-06-24 08:58:27 -03:00
Juan Linietsky
8ef1c41a4e Small fixes required to get platformer to work.
Added back CanvasItemMaterial
2017-06-23 14:31:59 -03:00
Juan Linietsky
f27d2a3355 -Moved NinePatch to shader, saves a ton of draw calls rendering UI
-Implemented missing stretch modes, now tile and tile fit work
2017-06-21 23:37:25 -03:00
Juan Linietsky
95560e02c5 2D GPU Particles working.. 2017-06-21 16:26:26 -03:00
Juan Linietsky
0288be1e76 Texture rect_region drawing now clamps UV to avoid bleeding. This avoids scenarios like single-texture tilemap tiles leaking pixels to the next tile when filter is enabled on it. 2017-06-18 22:55:02 -03:00
Juan Linietsky
5c6cac4e53 Add normalmap support for drawing in all low level primitives. Only added support in Sprite so far. 2017-06-17 23:27:42 -03:00
Juan Linietsky
2da3f48e5a -Fixed shader lang to not be able to get scalar from matrix (ie mat.x), to make it more GLSL compatible
-Fixed referencing of world_transform in fragment shader not working
-Fixed unsycn bug related to getting shader param list from the server
-Fixed getting all textures from shader properly, fixes #8353
2017-06-17 11:03:48 -03:00
Juan Linietsky
9757fc354c Fix transparent background rendering, closes #8703
Properly implemented UPDATE_WHEN_VISIBLE mode for viewports
2017-06-17 08:59:43 -03:00
Juan Linietsky
e11fae0bbf Particles properly update the shadow maps, closes #8815 2017-06-17 07:32:49 -03:00
Juan Linietsky
b19225bfce -Fix freezes caused by etccomp2, closes #9183
-Normalmaps are now detected and imported as RGTC, both in S3TC and ETC2, this improves their quality.
2017-06-16 21:49:37 -03:00
Juan Linietsky
80929d36be TIME constant reverted to a single float, fixes #9123 2017-06-16 08:30:21 -03:00
Juan Linietsky
5d02b948a9 Cleaned up Screen Space Reflections, closes #8119 2017-06-16 08:30:21 -03:00
Juan Linietsky
29cfc365aa Fixes to SSR, WIP. 2017-06-16 08:30:21 -03:00
Marc Gilleron
4dbe0967d5 Fixed memory leaks
- PoolVector leak
- mesh_remove_surface leak
2017-06-16 02:39:16 +02:00
Juan Linietsky
da14225ad8 fix bug related to unshaded materials not working on MSVC. Not cleanest solution, might think about how to improve later. 2017-06-15 10:36:00 -03:00
Juan Linietsky
47b34bf79b Remove error spam on Intel, closes #8665 2017-06-15 09:02:34 -03:00
Juan Linietsky
f8bd488457 Merge pull request #9109 from RandomShaper/optimize-2d-lighting
Add AT_LIGHT_PASS builtin to canvas shaders
2017-06-14 21:16:09 -03:00
Pedro J. Estébanez
93ffd9023f Add AT_LIGHT_PASS builtin to canvas shaders
This one allows for complex shaders paired with a simple lighting shader to skip code that would otherwise be pointlessly (and wastefully) run during the light pass.

Depending on your game (number of items and lights), this can yield some performance gain.
2017-06-15 02:03:15 +02:00
Juan Linietsky
2b62872547 Fix _draw_polygon colors and uvs 2017-06-14 18:43:57 -03:00
Juan Linietsky
462d8ceb46 Fixed several bugs with directional light, and changed defaults to be more sensible. 2017-06-14 17:06:36 -03:00
Juan Linietsky
a8a1f2e2a8 -Fixed occluder rendering, closes #8560
-Ability to smooth out 2D shadow filters
2017-06-13 01:23:04 -03:00
Juan Linietsky
95c248e24f Remove default shadow bias of 0.1 for spot and omni light, fixes #8654 2017-06-13 00:07:05 -03:00
Juan Linietsky
ea6cb22329 Merge pull request #8835 from ippan/particles_shader_index
add index to particles glsl
2017-06-12 23:33:41 -03:00
Juan Linietsky
fc04e0b1f2 Fix bug breaking shader when skeleton+tangents were used, closes #8673 2017-06-12 19:54:35 -03:00
Juan Linietsky
831860695c Fix empty shader related crash, closes #8314 2017-06-12 19:23:37 -03:00
Juan Linietsky
41c3ca358e Fixed _draw_polygon, should help fix other bugs.. 2017-06-12 18:56:16 -03:00
Juan Linietsky
61c82f4356 Restored everything related to information polling, and added information box for viewport. 2017-06-11 18:13:04 -03:00
Juan Linietsky
4d50c7ad8c Restored multiple viewport function, as well as view modes. 2017-06-11 15:52:03 -03:00
Pedro J. Estébanez
4d90750729 Add missing initializer for RasterizerStorageGLES3::Shader::ubo_size 2017-06-09 21:17:47 +02:00
alexholly
935f730170 renamed all Rect3.pos to Rect3.position 2017-06-09 15:54:02 +02:00
Juan Linietsky
612ab8fcdb -Restored multithread capability to VisualServer
-Restored resource previews!
2017-06-09 00:24:18 -03:00
Juan Linietsky
5bf810b5db -Added proper access to depth texture from shader
-Split Mesh into Mesh (abstrat class) and ArrayMesh, to allow to proper mesh primitives, as well as streamable meshes in the future.
2017-06-07 18:20:04 -03:00
Juan Linietsky
840ac8c018 Fog is complete! 2017-06-07 08:38:21 -03:00
Juan Linietsky
0fb99306ff -working SCREEN_TEXTURE, SCREEN_UV shader variables
-Added refraction support for default material
-Enabled BCS adjustments, as well as color correction.
2017-06-05 22:34:32 -03:00
Rémi Verschelde
f8d7670e82 Merge pull request #9038 from AlexHolly/rect2-rename-pos
renamed all Rect2.pos to Rect2.position
2017-06-05 15:52:05 +02:00
Juan Linietsky
5aa66d03d8 Added depth texture support (using parallax) to default material. 2017-06-04 20:35:45 -03:00
Juan Linietsky
8126a0cb12 subsurface scattering is fixed and working again 2017-06-03 21:14:05 -03:00
alexholly
a3c90b0293 renamed all Rect2.pos to Rect2.position 2017-06-04 02:09:17 +02:00
Juan Linietsky
8a1097a224 many fixes to image loader, voxel cone tracing, etc. 2017-06-02 22:08:41 -03:00
Juan Linietsky
e79d7149ea GI probes working back again 2017-06-01 22:38:07 -03:00
Juan Linietsky
c03131fc9f Rework shading modes and change location of light shader 2017-06-01 18:56:02 -03:00
Juan Linietsky
bd26fa7bf2 stuff got modified :( 2017-05-31 20:29:56 -03:00
Juan Linietsky
a134f58fb3 rewritten PBR implementation to make it friendlier with Blender 2017-05-31 20:29:56 -03:00
Juan Linietsky
5567e898d1 Several fixes related to PBR and Environment 2017-05-30 08:56:19 -03:00
Juan Linietsky
f89641907f -Added EXR supprot for HDR (no BC6 compression yet though)
-Improvements to texture importer
-Proper detection of S3TC compression modes, and added all modes to Image
-Fixes to non-power of 2 compressed textures, which should all be supported by GLES3
2017-05-26 22:31:32 -03:00
Juan Linietsky
bf6380ee70 Removed skybox support, added panorama support. Skybox support may come back eventually, but hope not. 2017-05-25 14:00:43 -03:00
BastiaanOlij
3768a3b2c5 More fixes for iOS Godot 3.0
- nicely exit if initialisation fails
- fix a few issues around new event handling
- use 16bit single channel framebuffer as 32bit is not supported on iOS
2017-05-23 22:38:36 +10:00
BastiaanOlij
c51ce72702 Added texture_get_texid 2017-05-20 10:09:36 +10:00
PanPan
d9e3bbe17d add index to particles glsl 2017-05-19 23:43:25 +08:00
Rémi Verschelde
f85cad4fec Merge pull request #8793 from ippan/shader_varying
fix varying in 3.0 shader
2017-05-18 19:00:21 +02:00
Juan Linietsky
98a3296702 Removal of Image from Variant, converted to a Resource. 2017-05-17 07:37:45 -03:00
PanPan
9079ef46e7 fix varying in 3.0 shader 2017-05-17 16:41:49 +08:00
Andreas Haas
c3e43c6d5f Revert "Particles potential crash fix" 2017-05-15 20:11:42 +02:00
honix
9d7d24682d Particles potential crash fix 2017-05-15 20:49:20 +03:00
Rémi Verschelde
f527a69462 Merge pull request #8589 from tagcup/dxt1_fix
Use correct mode for DXT1 textures.
2017-05-02 23:31:42 +02:00
Ferenc Arn
2f84731177 Use correct mode for DXT1 textures.
libsquish, which is used to generate all S3TC textures, works only with RGBA textures.

Fixes #8550.
2017-04-29 20:01:12 -05:00
George Marques
f7bd21a022
Fix compilation for UWP 2017-04-29 20:15:59 -03:00
Rémi Verschelde
515f92d03b Fix property warnings and hide some debug prints
"ALL IS GOOD" was a lie.

In particular, removes verbose "path not recognized" false positive.

The actual logic is to (somewhat naively) check all ResourceFormatLoaders
and to pick the first good match, so no need to warn about the formats
that do not match the type hint.
2017-04-23 11:17:32 +02:00
Rémi Verschelde
24b2186ff9 Merge pull request #8388 from Dobbias/fix_#8381
Fix gles3-particles shader not compiling
2017-04-18 00:01:08 +02:00
L. Krause
3e0f8bb254 Fix FBO depth texture format 2017-04-15 13:56:55 +02:00
Dobbias
5404e10803 replaced incompatible keywords/function 2017-04-13 16:46:16 +02:00
Juan Linietsky
1c480698ce -Fixed crash with splash screen on windows
-properly show editor without having to resize window on windows
2017-04-09 20:40:48 -03:00
Juan Linietsky
7ba71fb243 Restored (And auto-generated) splash image 2017-04-09 20:03:38 -03:00
Juan Linietsky
fccf2816d4 -Fix eternal black screen on Windows
-Disabled warnings on windows, need to properly set up warnings
2017-04-09 17:59:17 -03:00
Juan Linietsky
4286aef693 Particle system is complete. Rejoice! 2017-04-08 22:40:06 -03:00
Rémi Verschelde
df61dc4b2b Add "Godot Engine contributors" copyright line 2017-04-08 00:11:42 +02:00
Rémi Verschelde
efba539f93 Fix build on older GCC versions
Travis builds would fail with:
./drivers/gles3/rasterizer_storage_gles3.h:1018:19: error: ISO C++ forbids initialization of member 'fixed_fps' [-fpermissive]
2017-04-07 19:24:37 +02:00
Juan Linietsky
74808ac4d9 New particle system, mostly working, some small features missing. 2017-04-06 23:49:27 -03:00
Rémi Verschelde
1bd3648bb0 Merge pull request #8211 from robertdhernandez/NinePatch-Fix
[3.0] Fixed NinePatchRect/StyleBoxTexture incorrectly drawing AtlasTexture
2017-04-03 14:41:53 +02:00
volzhs
e65b8b666c Fix failing to compile shader on Adreno GPU 2017-04-02 23:16:25 +09:00
Robert Hernandez
a4a12a2b7b Fixed AtlasTexture being incorrectly
Fixed StyleBoxTexture and NinePatchRect drawing the entire texture of an
AtlasTexture.
2017-03-30 21:09:25 -04:00
Rémi Verschelde
debeee56f7 Fix typos in source code using codespell
From https://github.com/lucasdemarchi/codespell
2017-03-24 21:45:31 +01:00
Juan Linietsky
efaeebab4d Several fixes to Android exporter and port.
Android seems to be working again!
2017-03-23 20:14:12 -03:00
eska
12dd86bba0 Some WebGL 2 and build fixes/clean-up 2017-03-17 15:56:48 +01:00
Juan Linietsky
af020160c6 more html5 fixes 2017-03-14 10:53:46 -03:00
Rémi Verschelde
b19b8f72e8 Merge pull request #8009 from Calinou/directional_shadow_interpolation
Improve directional shadow filtering by using linear interpolation
2017-03-13 11:03:45 +01:00
Rémi Verschelde
a45e6f67d5 Merge pull request #7981 from RandomShaper/position-for-2d-shaders
Map POSITION to gl_FragCoord.xy for 2D shaders
2017-03-13 11:01:14 +01:00
Juan Linietsky
6d15e15732 converted skeletons from uniform to texture 2017-03-12 13:08:56 -03:00
Hugo Locurcio
335d96a0ab Improve directional shadow filtering by using linear interpolation 2017-03-11 12:24:54 +01:00
Pedro J. Estébanez
5ff0924a93 Map POSITION to gl_FragCoord.xy for 2D shaders 2017-03-08 02:07:59 +01:00
Rémi Verschelde
6163343118 Make that Whole New World great again
Fix regression from 5dbf180 that broke Windows build.
2017-03-05 19:12:22 +01:00
Rémi Verschelde
5dbf1809c6 A Whole New World (clang-format edition)
I can show you the code
Pretty, with proper whitespace
Tell me, coder, now when did
You last write readable code?

I can open your eyes
Make you see your bad indent
Force you to respect the style
The core devs agreed upon

A whole new world
A new fantastic code format
A de facto standard
With some sugar
Enforced with clang-format

A whole new world
A dazzling style we all dreamed of
And when we read it through
It's crystal clear
That now we're in a whole new world of code
2017-03-05 16:44:50 +01:00
Rémi Verschelde
e1c1d7d1d7 Add a bunch of missing Godot headers in own files 2017-03-05 15:47:28 +01:00
Ferenc Arn
790611ef26 Added missing FIXMEs in PR #7878 2017-03-02 16:13:01 -06:00
Thaer Razeq
f50488a361 Various fixes detected using PVS-Studio static analyzer.
- Add FIXME tags comments to some unfixed potential bugs
- Remove some checks (always false: unsigned never < 0)
- Fix some if statements based on reviews.
- Bunch of missing `else` statements
2017-02-28 07:52:02 -06:00
Juan Linietsky
ffcd954211 Fixes to webgl/opengl es 3.0 for compatibility with webgl2.0, still does not work though 2017-02-22 19:14:21 -03:00
Juan Linietsky
de0045cf1b -renamed globals.h to global_config.cpp (this seems to have caused a few modified files)
-.pck and .zip exporting redone, seems to be working..
2017-02-21 00:06:30 -03:00
Hein-Pieter van Braam
b696beea65 Correct hash behavior for floating point numbers
This fixes HashMap where a key or part of a key is a floating point
number. To fix this the following has been done:

* HashMap now takes an extra template argument Comparator. This class
gets used to compare keys. The default Comperator now works correctly
for common types and floating point numbets.

* Variant implements ::hash_compare() now. This function implements
nan-safe comparison for all types with components that contain floating
point numbers.

* Variant now has a VariantComparator which uses Variant::hash_compare()
safely compare floating point components of variant's types.

* The hash functions for floating point numbers will now normalize NaN
values so that all floating point numbers that are NaN hash to the same
value.

C++ module writers that want to use HashMap internally in their modules
can now also safeguard against this crash by defining their on
Comperator class that safely compares their types.

GDScript users, or writers of modules that don't use HashMap internally
in their modules don't need to do anything.

This fixes #7354 and fixes #6947.
2017-02-16 18:44:29 +01:00
Juan Linietsky
903a3aa5f0 a ton of bug fixes to the renderer 2017-02-16 08:55:43 -03:00
Juan Linietsky
da11d6d9e8 Many fixes to make exported scenes work better, still buggy. 2017-02-15 08:34:02 -03:00
Juan Linietsky
d7fd86d51a -begin of export work, not done yet
-fixes to make scenes exported from godot 2.x work
2017-02-15 08:30:32 -03:00
Juan Linietsky
07bbcf91f7 basic contact shadows implementation, will most likely need some polishing 2017-02-08 07:35:14 -03:00
Juan Linietsky
6bfaa0f12c shadows were not working in-editor for nvidia, fixed now 2017-02-06 20:18:35 -03:00
Juan Linietsky
5cc63dee0f ability to adjust propagation in gi probe 2017-02-06 05:12:15 -03:00
Juan Linietsky
6f2e16306a Several bugfixes, improving the import workflow 2017-02-06 00:38:39 -03:00
Rémi Verschelde
40e4c1f6ab Merge pull request #7689 from eska014/webgl2
Enable WebGL2 in web export, start fixing build
2017-02-02 08:18:42 +01:00
eska
e06edc67c0 Enable WebGL2 in web export, start fixing build
Will not yet compile
2017-02-01 10:21:04 +01:00
Ferenc Arn
6f4f9aa6de Overloaded basic math funcs (double and float variants). Use real_t rather than float or double in generic functions (core/math) whenever possible.
Also inlined some more math functions.
2017-01-16 13:36:33 -06:00
BastiaanOlij
3a02df7739 Working on compile issues for iOS 2017-01-16 23:14:13 +11:00
Rémi Verschelde
f44ee891be Style: Fix statements ending with ';;' 2017-01-16 08:49:52 +01:00