Commit graph

548 commits

Author SHA1 Message Date
clayjohn 3365595254 do not compute fog when using unshaded in GLES2 2019-05-23 17:17:27 -07:00
Bastiaan Olij 3ea778e66e Implement shadow to opacity 2019-05-21 20:07:46 +10:00
Rémi Verschelde e0574e1d98 Fix typos with codespell
Using codespell 1.15.0.

Method:
```
$ cat > ../godot-word-whitelist.txt << EOF
ang
curvelinear
doubleclick
leapyear
lod
merchantibility
nd
numer
ois
ony
que
seeked
synching
te
uint
unselect
webp
EOF

$ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po"
$ git diff // undo unwanted changes
```
2019-05-19 13:10:35 +02:00
Rémi Verschelde aa3c5f59f2
Merge pull request #27898 from clayjohn/metallic_radiance
Added radiance when using clear color
2019-05-14 07:32:01 +02:00
clayjohn 5c252092e1 added radiance when using clear color and fixed brdf 2019-05-13 12:26:54 -07:00
Rémi Verschelde 86a74e2cb3
Merge pull request #27798 from clayjohn/gles2-proj-mat-bug
Fixes bug when setting projection matrix in shader GLES2
2019-05-13 17:59:40 +02:00
Rémi Verschelde e0517a12c5
Merge pull request #28518 from clayjohn/GLES2-MSAA
Added MSAA to GLES2 backend
2019-05-13 17:46:11 +02:00
Rémi Verschelde a0a5047cfd
Merge pull request #28723 from SouzaGuilherme/fix_shadows
Fix SHADOWS_DISABLED flag in GLES2
2019-05-13 17:22:57 +02:00
Daniel Rakos e34eb5c26c Fix texture resource reload bug
If a non-imported texture resource file (e.g. DDS) gets updated the editor
doesn't reload it. The cause of the problem is two-fold:

First, the code of ImageTexture assumes that textures are always imported
from an image, but that's not the case for e.g. DDS. This change thus adds
code to issue a resource reload in case an image reload is not possible
(which is the case for non-imported texture resources).

Second, the code is filled with bogus calls to Image::get_image_data_size()
to determine the mipmap offset when that should be done using
Image::get_image_mipmap_offset(). Previous code literally passed the integer
mip level value to Image::get_image_data_size() where that actually expects
a boolean. Thus this part of the change might actually solve some other
issues as well.

To be pedantic, the texture_get_data() funciton of the rasterizer drivers is
still quite a mess, as it only ever returns the whole mipchain when
GLES_OVER_GL is set (practically only on desktop builds) but this change does
not attempt to resolve that.
2019-05-08 17:22:40 +02:00
Guilherme Souza b363125568 Fix SHADOWS_DISABLED flag in GLES2
Signed-off-by: Guilherme Souza <gdsdsilva@inf.ufpel.edu.br>
2019-05-07 12:42:28 -03:00
clayjohn a3d5aec68d added MSAA to GLES backend 2019-05-02 14:24:20 -07:00
Rémi Verschelde dd2cd06165
Merge pull request #25670 from aqnuep/bake_mode_affect_gi_prove
Disable GI probe capturing lights with bake mode disabled
2019-04-30 18:33:34 +02:00
clayjohn e37d723695 fixes bug when setting projection matrix 2019-04-30 08:36:38 -07:00
Rémi Verschelde a5c619dc8d
Merge pull request #28520 from clayjohn/GLES2-alpha-draw-order
Fixed GLES2 transparency order
2019-04-30 17:20:05 +02:00
clayjohn 7ae3809f4b Fixed GLES2 transparency order 2019-04-29 12:22:41 -07:00
Rémi Verschelde a3617f6ca8
Merge pull request #28431 from SouzaGuilherme/master
Adds flag AMBIENT_LIGHT_DISABLED to GLES2
2019-04-29 16:55:36 +02:00
Guilherme Souza 61a844aa61 Adds flag AMBIENT_LIGHT_DISABLED to GLES2
Signed-off-by: Guilherme Souza <gdsdsilva@inf.ufpel.edu.br>
2019-04-25 20:25:05 -03:00
Daniel Rakos de33ef2d1b Disable GI probe capturing lights with bake mode disabled
The bake mode property of lights previously didn't affect GI probes.
This change makes the GI probe ignore lights that have their bake mode
set to disabled.
2019-04-23 11:36:36 +02:00
Rémi Verschelde a342131eba
Merge pull request #27673 from qarmin/small_fixes
Small fixes, mostly duplicated code
2019-04-22 12:00:34 +02:00
Rémi Verschelde dab8f8c953
Merge pull request #27967 from clayjohn/fix-mip-bug
Fixed bug in computing mip maps from screen texture
2019-04-15 13:05:50 +02:00
clayjohn 670c1b10b2 fixed bug in mip map sigma 2019-04-12 17:48:38 -07:00
Rémi Verschelde c8994b56f9 Style: Apply new changes from clang-format 8.0
It seems to stay compatible with formatting done by clang-format 6.0 and 7.0,
so contributors can keep using those versions for now (they will not undo those
changes).
2019-04-09 17:09:48 +02:00
JFonS 059078f075 Fix hint_range for GLES2 shader uniforms 2019-04-08 11:53:57 +02:00
qarmin 856a8226a5 Small fixes, mostly dupicated code 2019-04-08 11:03:37 +02:00
Rémi Verschelde c562a7d149
Merge pull request #27067 from shartte/remove-context-gl
Remove ContextGL
2019-04-07 12:38:55 +02:00
Sebastian Hartte 3a8c6db513 Remove ContextGL since as an abstraction it's unused. 2019-04-06 17:52:52 +02:00
Bastiaan Olij 8349d4fbd9 Add option to have viewport render into supplied texture 2019-04-06 08:24:58 +11:00
Rémi Verschelde cffbb99327
Merge pull request #27411 from KidRigger/raster_store
Added GLES2 RenderStorage Info calculations.
2019-04-05 15:22:22 +02:00
marxin e7f22ebdcd Enable warnings=extra on clang and GCC testers.
And remove 2 warnings from warnings=extra.
2019-04-02 17:14:47 +02:00
clayjohn 5056b4a02c keep DEPTH from causing compile error in GLES2 2019-03-28 22:14:41 -07:00
Anish Bhobe 4839b17f93 Added GLES2 RenderStorage Info calculations.
Proper counting code has been added to update info struct.

Extra: Added the render_info_capture calculations.
Fixes: #27273
2019-03-25 23:08:23 +05:30
Rémi Verschelde ac483345c4 GLES2: Convert unsupported float texture types to 8-bit types 2019-03-12 12:14:37 +01:00
Rémi Verschelde 3ebde6fac3 GLES2: Fix comments in previous commit that broke rendering (!)
Do NOT use "[vertex]" in a comment...

Kids, don't try to learn OpenGL on a production branch right before
a stable release.
2019-03-12 00:26:56 +01:00
Rémi Verschelde 74e224f2c7 GLES2: Add comments around EXT_shader_texture_lod check
To avoid reintroducing bugs as I did in #26928 and #26932.

texture2DLodEXT and textureCubeLodEXT are only for the fragment shader with
https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_shader_texture_lod.txt
In the vertex shader, texture2DLod and textureCubeLod are built-in.
2019-03-11 23:18:21 +01:00
Rémi Verschelde 764671d2d0 Revert "GLES2: Ensure extension checks for texture2DLod"
This reverts commit f5f565e3e4.
2019-03-11 23:12:49 +01:00
Rémi Verschelde 4cdb2d0502 Revert "GLES2: Fix regression on texture2DLod extension checks"
This reverts commit 8c2d38152f.
2019-03-11 23:12:39 +01:00
Rémi Verschelde 8c2d38152f GLES2: Fix regression on texture2DLod extension checks
These can't be done after any non-preprocessor token.
2019-03-11 21:59:20 +01:00
Rémi Verschelde bc3c6338cf
Merge pull request #26928 from akien-mga/gles2-texture2DLod-ext-check
GLES2: Ensure extension checks for texture2DLod
2019-03-11 20:51:36 +01:00
Juan Linietsky d9235be54b Enable seamless cubemap only if extension is present. 2019-03-11 16:49:04 -03:00
Rémi Verschelde f5f565e3e4 GLES2: Ensure extension checks for texture2DLod
In canvas.glsl and scene.glsl, we were using texel2DFetch from stdlib.glsl,
which uses texture2DLod. In both cases, the stdlib.glsl include came before
the define of texture2DLod.

Might fix issues for drivers that don't support GL_EXT_shader_texture_lod.
2019-03-11 19:34:31 +01:00
clayjohn 13eee31461 increase size of radiance map in gles2 2019-03-10 22:08:08 -07:00
clayjohn 63bb6808e6 gles2 reallocate texture when transparent is set 2019-03-09 10:56:51 -08:00
Juan Linietsky 7141c73ae8 Use glCopyTexSubImage2D instead of glCopyTexImage2D, should be safer and faster.
May be a solution to #26500
2019-03-07 00:14:13 -03:00
Rémi Verschelde b753223ac2
Merge pull request #26567 from clayjohn/pixel_snap_artifact
Fixed pixel snap precision artifact
2019-03-04 16:58:08 +01:00
clayjohn b804c491b7 fixed pixel snap precision artifact 2019-03-04 07:18:02 -08:00
Rémi Verschelde b811207406 More style cleanup... 2019-03-04 10:11:29 +01:00
Juan Linietsky 34dd772054 Properly redraw if something animated is visible 2019-03-03 13:43:54 -03:00
Juan Linietsky 2f32a75d2e Skeletons can now choose between using local or world coords for processing, fixes #26468 2019-03-03 12:24:00 -03:00
Rémi Verschelde e930fb9a6e Fix typo in 7bad170
And cleanup.
2019-03-02 00:45:01 +01:00
Juan Linietsky 7bad1706c2 -Fix prepass state not being reset, closes #26348
-Send zero values for shader if no default exists
2019-03-01 19:28:24 -03:00