Juan Linietsky
7478f468b2
Fixes to 2D lights, closes #24750
2019-01-17 10:40:36 -03:00
Juan Linietsky
ffcb5cd18c
Ensure texture hints are obeyed, fixes #24875
2019-01-16 00:37:00 -03:00
Rémi Verschelde
72f501de13
GLES2: Fix typo in project setting
...
It used a different name than the equivalent GLES3 parameter.
2019-01-15 13:26:54 +01:00
Juan Linietsky
ee3eadf345
Implement black margins in GLES2, which was missing, fixes #24556
2019-01-14 19:00:36 -03:00
Rémi Verschelde
02ffc59270
GLES2: Make Nvidia flicker workaround opt-in
...
It has a big impact on 2D and text rendering performance (cf. #24466 )
so the solution seems worse than the bug it aims to work around.
It's now opt-in via "rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround"
for those who need it and have a simple enough game for the performance
drop not to be an issue.
Fixes #24466 .
2019-01-14 19:02:07 +01:00
Juan Linietsky
b3dc02b5df
Was not properly re-setting light uniforms, fixes #24976
2019-01-14 12:04:26 -03:00
Juan Linietsky
6d8083ea65
Do not use the workaround for desktop nvidia on mobile and html5.
2019-01-14 11:24:00 -03:00
Rémi Verschelde
1185f4c4ac
GLES2: Clarify why we exclude debug code on iOS
...
Supersedes and closes #24873 .
2019-01-11 20:04:13 +01:00
Juan Linietsky
a3a537c2cf
Fix background color rendering on GLES2 (linear should not be used)
2019-01-07 10:52:24 -03:00
Daeil Kim
ecf520b70e
Change blend equation for canvasitems
2019-01-06 00:57:52 +09:00
Rémi Verschelde
1504c96112
Merge pull request #24539 from BastiaanOlij/override_gl_position
...
Override GL_position
2019-01-04 15:40:05 +01:00
Marcin Zawiejski
4e73274837
Fix negative size rectangle drawing
...
Fixes rectangle being drawn as it was a non-negative size in case it actually is. This can be observed e.g. when drawing a negative size selection rectangle (i.e. press mouse button and move cursor up and left).
2019-01-02 14:47:28 +01:00
Rémi Verschelde
c7c87a0624
Merge pull request #24687 from DavidSichma/draw-rect-rot
...
fix draw_rect rotation
2019-01-01 19:01:18 +01:00
Rémi Verschelde
b16c309f82
Update copyright statements to 2019
...
Happy new year to the wonderful Godot community!
2019-01-01 12:58:10 +01:00
Rémi Verschelde
d1f3b622f0
Fix missing/malformed license headers
2019-01-01 12:46:36 +01:00
David Sichma
9ba6849cf4
fix draw_rect rotation
2018-12-31 20:56:10 +01:00
Rémi Verschelde
6a07d7f83f
Merge pull request #24661 from humblers/fix-unshaded-gles2
...
Fix unshaded light mode on GLES2
2018-12-30 13:48:01 +01:00
Rémi Verschelde
6c67ca3f5b
Merge pull request #24653 from avril-gh/fixes-syntax-error-in-scene-glsl
...
fixes glsl syntax error
2018-12-30 13:07:12 +01:00
Daeil Kim
8c99b6fb2f
Change unshaded logic to match with GLES3
2018-12-30 02:02:37 +09:00
Avril
971c05dc5e
fixes glsl syntax error
2018-12-29 15:37:50 +01:00
Bastiaan Olij
9f266cf7e5
Override GL_position
2018-12-29 23:56:50 +11:00
Bastiaan Olij
9055386de9
Fix texture type not being initialised
2018-12-29 23:44:28 +11:00
Juan Linietsky
a366d45856
-Implented 2D Mesh support for GLES2
...
-Implemented 2D Skeleton deform for GLES2
-Implement Multimesh support for GLES2, closes #20524 , closes #21839
2018-12-27 20:41:04 -03:00
Rémi Verschelde
57416bfbce
GLES2: Define 'lowp' for OpenGL 2.1
...
Precision qualifiers are only used on OpenGL ES 2.0 and 3.0,
and while OpenGL 3.3 defines them for compatibility (but without
practical effect), they're missing from OpenGL 2.1, so we define
them to prevent compilation errors.
Fixes #24521 .
2018-12-21 15:14:58 +01:00
Juan Linietsky
7b1cbe9874
Reverse RGBA shadow test on GLES2
2018-12-21 10:02:43 -03:00
Juan Linietsky
7535c5a56a
Further GLES2 fixes
2018-12-21 10:01:16 -03:00
Juan Linietsky
9ea27ec032
Fixes to framebuffer formats for GLES2, closes #24518
2018-12-21 09:50:57 -03:00
Juan Linietsky
f3cb236f9d
Remove usage of VAO, which does not work in GLES2
2018-12-20 17:28:01 -03:00
Juan Linietsky
3bdd1ff387
Support lights and shadows in GLES2, fixes #21853
2018-12-20 10:10:30 -03:00
Rémi Verschelde
b3f6e54cc6
Style: Fix formatting in GLES2 shaders
2018-12-20 10:33:48 +01:00
Gitea
9f48094982
fix gles2 spotlight problem
2018-12-20 15:01:59 +08:00
Juan Linietsky
aa819a8538
Properly support light shaders in GLES2, fixes #21651
2018-12-19 10:25:45 -03:00
Juan Linietsky
bec76cfa19
Change how rects are drawn (and also will help batching eventually), to workaround problem in #9913
2018-12-18 17:50:35 -03:00
Juan Linietsky
89abfd40ed
Reduce considerably the cubemap sizes on sky, to better match GLES3, fixes #21551
2018-12-18 13:01:46 -03:00
Juan Linietsky
85d44dd7b6
Actually respect the low quality cubemap filter on mobile, should fix crashes on mobile for #21551 but not sure on intel.
2018-12-18 12:52:50 -03:00
Rémi Verschelde
20379119c3
Merge pull request #24366 from BastiaanOlij/adjust_sky_orientation
...
Adding option to re-orient our sky
2018-12-16 22:56:43 +01:00
Bastiaan Olij
205bcff279
Fix highp issue in lens shader on gles2
2018-12-16 08:47:47 +11:00
Bastiaan Olij
f3dd3c0830
Adding option to re-orient our sky
2018-12-15 19:41:34 +11:00
Rémi Verschelde
c8a5400654
Merge pull request #24241 from Rubonnek/move-to-initializer-list
...
Moved member variables to initializer list
2018-12-12 09:25:34 +01:00
Wilson E. Alvarez
08f22f1cf0
Moved member variables to initializer list
2018-12-11 18:33:01 -05:00
Rémi Verschelde
37e198c320
Merge pull request #23483 from clayjohn/fragment_camera_view
...
Make VIEW vector available in fragment shader
2018-12-11 20:44:41 +01:00
clayjohn
2042d6214e
make VIEW vector available in fragment
2018-12-11 09:44:38 -08:00
muiroc
2827ee77d0
gles2 implemented VIEWPORT_SIZE builtin for spatial shader
2018-12-11 18:11:07 +01:00
Rémi Verschelde
e2caaf1b6d
Merge pull request #23899 from BastiaanOlij/fix_particle_active
...
Remapped ACTIVE to shader_active, now works
2018-12-02 21:26:12 +01:00
Rémi Verschelde
f8bb7e0673
Merge pull request #24089 from clayjohn/gles2_camera_matrix_bug
...
Fixed gles2 camera_matrix bug
2018-12-02 20:48:08 +01:00
Bastiaan Olij
0b4b477674
Remapped ACTIVE to shader_active, now works
2018-12-01 21:10:04 +11:00
clayjohn
fd7607bf82
fixed gles2 camera_matrix bug
2018-11-30 10:20:16 -08:00
Rémi Verschelde
a741f83811
Merge pull request #23945 from DavidSichma/gles2artifact
...
Fixed black artifacts on SpatialMaterial [GLES2]
2018-11-28 16:21:59 +01:00
Rémi Verschelde
c7dd58a4d5
Merge pull request #23981 from khairul169/fix_gles2_clearcolor
...
GLES2: Set clear color based on env background mode when rendering scene and fix viewport transparent bg flag
2018-11-28 15:10:28 +01:00
Aaron Franke
cb01268562
Fix many errors found by PVS-Studio
...
Fix errors 2, 3, 4, 6, 8, 9, 11, 12, 13, 14, and 15.
2018-11-28 05:03:24 -05:00
Rémi Verschelde
dd06f6ee70
Fix style issues and signature mismatch
2018-11-28 10:21:07 +01:00
Juan Linietsky
af8d941c55
Added luminance capping to avoid glitches on small dots. closes #17996
2018-11-28 01:22:20 -03:00
khairul169
797bcfd44d
GLES2: clear color on scene render
2018-11-27 01:47:34 +07:00
David Sichma
1a7d1d88f8
Fixed black artifacts on SpatialMaterial [GLES2]
2018-11-24 16:51:32 +01:00
Rémi Verschelde
c5ebf38490
Prevent GLAPIENTRY redefine in rasterizer, now included in glad.h
...
We otherwise had conflicting defines since 1a41daf3
.
2018-11-23 21:19:59 +01:00
Juan Linietsky
78eae047c6
Fixed how floats are printed to the GLSL shader, closes #19803
2018-11-19 23:41:18 -03:00
Juan Linietsky
d304228003
Do not draw particles if they are not processing at all, fixes #19507
2018-11-19 20:34:29 -03:00
Rémi Verschelde
60ee61c7ff
Merge pull request #23742 from JFonS/fix_23698
...
Use hint_color when getting shader default params
2018-11-18 12:05:02 +01:00
Wilson E. Alvarez
f8e0051420
Removed unnecessary assignments
2018-11-17 20:40:55 -05:00
Juan Linietsky
e77afb8507
Ensure environment radiance is not used on refprobe interiors, fixes #17868
2018-11-16 11:46:21 -03:00
Juan Linietsky
bb9127a78b
Removed unnecesary normal multiplication (only culling was really needed), fixes #17776
2018-11-16 10:52:31 -03:00
JFonS
fb92c7b0fa
Use hint_color when getting shader default params
2018-11-16 12:20:23 +01:00
Juan Linietsky
4d88721e62
Do not error on empty shader, just treat it as invalid by default. Fixes #15998 .
2018-11-14 10:58:16 -03:00
Juan Linietsky
55f5f4757e
Merge pull request #23248 from dlasalle/fog
...
Add parameters for fog end depth and use alpha as density.
2018-11-14 10:24:55 -03:00
Juan Linietsky
984063cf0b
Cleaned up and fixed the base_changed function in rasterizers, also fixes #15617
2018-11-14 09:32:39 -03:00
Dominique LaSalle
6eae6247e4
Add parameter for fog max depth and use alpha as density.
2018-11-13 17:19:11 -08:00
Rémi Verschelde
8849d3b47d
Merge pull request #22639 from tagcup/opt
...
Avoid some unnecessary calculations in scene.glsl.
2018-11-12 21:22:57 +01:00
Rémi Verschelde
3bc7dfc856
Merge pull request #23254 from ibrahn/gles2-var-init-cleanup
...
Cleaning up some uninitialised variables in GLES2 stuff.
2018-11-12 20:47:19 +01:00
Juan Linietsky
3e128a6d8a
Was missing calling _mkid() in shader_gles2.cpp, regarding fix for #12880
2018-11-10 10:52:24 -03:00
Juan Linietsky
f00b522705
Avoid double underscore from breaking glsl compiler, fixes #12880
2018-11-10 10:48:18 -03:00
Rémi Verschelde
17b776e549
Merge pull request #23502 from Rubonnek/simplified-logic
...
Simplified boolean logic in GLES2/3 rasterizers
2018-11-05 08:31:14 +01:00
JFonS
85ce4a67ed
Remove animation loop from ParticlesMaterial + improvements to CPUParticles2D
...
Remove animation loop from ParticlesMaterial and move it to
SpatialMaterial for 3D particles and Particles2D for the 2D case.
Added animation to CPUParticles2D as well as the "Convert to
CPUParticles2D" to the PAarticles2D menu.
2018-11-04 15:58:12 +01:00
Wilson E. Alvarez
e4884cfc75
Simplified boolean logic in GLES2/3 rasterizers
2018-11-04 09:14:50 +00:00
Ibrahn Sahir
352b3c9c93
Cleaning up some uninitialised variables in GLES2 stuff.
...
Initialise keep_original_textures and use_fast_texture_filter in storage
config. Removed any other variables from storage config that were both unused
and uninitialised to avoid future confusion (if they're needed it's
easier to spot an uninitialised variable problem in a PR that adds the
variable again rather than just uses it).
Copied storage Texture struct constructor from GLES3 implementation
(except where variables were already initialised with different values).
Gives us sensible tested defaults for previously uninitialised vars.
Added assignments for state.current_main_tex based on same in GLES3.
2018-11-02 14:09:32 +00:00
Juan Linietsky
9c195b57a0
Merge pull request #23125 from JFonS/fix_texture_get_data
...
Implement rasterizer texture_get_data on OpenGL ES
2018-11-01 12:56:31 -03:00
JFonS
edcccaf8c1
Implement rasterizer texture_get_data on OpenGL ES
2018-11-01 11:30:49 +01:00
Pedro J. Estébanez
11815a23dc
Fix GLES2 automatic texture lookup in canvas
...
After this change the color will only be fetched if the shader code doesn't use it explicitly, to match the GLES3 behaviour.
Fixes #23179 .
2018-10-28 02:37:34 +01:00
Rémi Verschelde
b9eb3a048e
GLES2: Fix shadows shader error for SpotLights
...
Fixes #23268 .
2018-10-25 12:14:02 +02:00
Rémi Verschelde
1169196f04
Merge pull request #22779 from Superwaitsum/LimitSettings
...
Limit several project settings
2018-10-25 11:38:06 +02:00
Superwaitsum
e5041ad0f5
Add some limits on the Editor Settings
2018-10-24 19:46:33 -05:00
Rémi Verschelde
cfa8ef1f77
Merge pull request #23186 from BastiaanOlij/fix_gles2_stereo_sky
...
Fixed stereoscopic (VR) sky in GLES2
2018-10-24 15:16:36 +02:00
Rémi Verschelde
053da2b487
GLES2: Fix typo in tangent calculation
...
Thanks @tagcup for the find.
Fixes #23234 .
2018-10-24 11:10:16 +02:00
Bastiaan Olij
ef06079ad1
Fixed stereoscopic (VR) sky in GLES2
2018-10-21 11:36:01 +11:00
Dualtagh Murray
b902a2f2a7
Fixing warnings generated by MSVC
...
Fixes #22684 .
2018-10-19 11:45:24 +02:00
M. Huri
55c8fda884
Removed duplication of include(s):
...
- "collision_solver_sat.h".
- "shaders/copy.glsl.gen.h"
2018-10-13 20:25:34 +07:00
Ferenc Arn
35ea827e83
Avoid some unnecessary calculations in scene.glsl.
2018-10-11 10:34:37 -04:00
Leon Krause
7a4d5ddb4d
Format GLES2 scene.glsl
2018-10-06 02:17:24 +02:00
Leon Krause
e869d53e6d
Fix GLES2 uniform precision
2018-10-06 02:15:04 +02:00
Rémi Verschelde
97b9697ea2
Fix some OSX and iOS Clang warnings
...
Fixes the following XCode 9.4.1 warnings:
```
core/os/memory.cpp:175:13: warning: unused variable 's' [-Wunused-variable]
drivers/coremidi/core_midi.cpp:68:14: warning: comparison between NULL and non-pointer ('MIDIEndpointRef' (aka 'unsigned int') and NULL) [-Wnull-arithmetic]
drivers/gles2/rasterizer_gles2.cpp:77:24: warning: unused function '_gl_debug_print' [-Wunused-function,34]
drivers/unix/thread_posix.cpp:106:12: warning: unused variable 'running_thread' [-Wunused-variable,34]
modules/gdnative/nativescript/nativescript.h:371:16: warning: in-class initialization of non-static data member is a C++11 extension [-Wc++11-extensions]
platform/iphone/gl_view.mm:56:14: warning: unused variable 'video_previous_volume' [-Wunused-variable,34]
platform/iphone/gl_view.mm:251:12: warning: unused function 'get_first_id' [-Wunused-function,34]
platform/iphone/main.m:45:15: warning: unused variable 'app' [-Wunused-variable,34]
platform/osx/os_osx.mm:79:15: warning: unused function 'convertRectToBacking' [-Wunused-function]
```
2018-10-04 11:50:16 +02:00
Jean-François Michaud
700d5d26c9
Fix #22591 : shader failed to compile when shadow enabled because of incompatible assignment of vec3 to a vec4.
2018-10-03 13:42:17 -04:00
Juan Linietsky
286b70839e
vertex lit optimization for fog.
2018-10-02 19:08:33 -03:00
Juan Linietsky
11f088279d
Implemented FOG support in GLES2.
2018-10-02 18:53:16 -03:00
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
Ferenc Arn
658c2b6eee
Bring accidentally commented out lines back.
...
Oversight by me in #22483 . GLES2 doesn't seem to be supporting anisotropy at the moment anyway ---in case it gets revived.
2018-10-02 12:44:31 -04:00
Rémi Verschelde
63e1c6dce3
Disable GLES2 debugging on iOS, fixes build
...
Could be readded by someone who knows how to access an API
similar to EGL on iOS.
2018-10-02 16:34:31 +02:00
Rémi Verschelde
ac2a4771d5
GLES2: Implement pixel snap 2D option
2018-10-02 15:53:24 +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
Rémi Verschelde
6e619ccb24
Merge pull request #22562 from muiroc/gles2_canvas_skip_transform
...
Uses skip_vertex_transform in GLES2 canvas shader
2018-10-02 15:12:50 +02:00
Rémi Verschelde
123931f7eb
Merge pull request #22574 from BastiaanOlij/mobile_vr_gles2
...
Moving lens distortion shader into drivers and adding GLES2 support
2018-10-02 15:08:59 +02:00