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
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
Rémi Verschelde
b811207406
More style cleanup...
2019-03-04 10:11:29 +01: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
0ba75c195e
Fix GCC 5 build after #26331 and cleanup style
...
Also cleanup after 01a3dd3
.
2019-02-27 09:01:24 +01:00
Rémi Verschelde
e47b4bdc3d
Merge pull request #26286 from kaadmy/gles2_ortho_shadow
...
Fix orthographic shadow color when using GLES2
2019-02-26 08:50:42 +01:00
Juan Linietsky
a32b26dfa2
Several fixes to make GLES2 on HTML5 work much better.
...
Changed math class error reporting to be a bit less paranoid.
2019-02-25 21:47:29 -03:00
KaadmY
e1a34d0728
Fix orthographic shadow color when using GLES2
2019-02-25 13:57:23 -08:00
Hein-Pieter van Braam
a83e77fded
Explicitly use floating point numbers in the our shaders
...
We need to be explicit about using floating point numbers in our shaders
for compatibility with mobile GLES drivers.
2019-02-24 23:35:10 +00:00
Juan Linietsky
d79c8d7655
Fix vertex lighting in GLES2, closes #25365
2019-02-23 19:53:04 -03:00
Juan Linietsky
aab8f443f9
-Support DEPTH_TEXTURE in GLES2, fixes #25106
...
-Fix use of transparent framebuffers in GLES2
-Fix use of ambient color clearing in GLES2 when no environment exists.
2019-02-22 11:35:39 -03:00
Rémi Verschelde
c4b736d7ad
Fix code style issues
2019-02-22 09:52:27 +01:00
clayjohn
9b0326d2f3
added shadow_color property to gles2
2019-02-17 23:57:57 -08:00
Juan Linietsky
4af8009b9d
Fix fog in GLES2 by using epic hack, closes #25410
2019-02-12 14:35:16 -03:00
Juan Linietsky
2e5ede7a4e
Properly discard fragments during depth prepass opaque pass, fixes #23321
2019-01-27 20:20:07 -03:00
Juan Linietsky
b32298a660
Ensure WebGL uses highp by default, and fix some wrong mediump usages. Fixes #22962 .
2019-01-24 18:58:42 -03:00
Juan Linietsky
2d57ec2460
Fix problem with texture2Dlod, closes #25263
2019-01-23 17:06:37 -03:00
Juan Linietsky
4f4e46edd5
Implement unpacking for compressed vertex formats on GLES2 when not supported, fixes #22957
2019-01-22 21:57:09 -03: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
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
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
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
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
David Sichma
1a7d1d88f8
Fixed black artifacts on SpatialMaterial [GLES2]
2018-11-24 16:51:32 +01:00
Juan Linietsky
bb9127a78b
Removed unnecesary normal multiplication (only culling was really needed), fixes #17776
2018-11-16 10:52:31 -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
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
b9eb3a048e
GLES2: Fix shadows shader error for SpotLights
...
Fixes #23268 .
2018-10-25 12:14:02 +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
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
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
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
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
85bb1c445c
Style: Run clang-format on shaders again
2018-10-02 08:34:08 +02:00
Juan Linietsky
c24277a520
-Many GLES2 optimizations
...
-Android export fixes (use ETC if GLES2 backend in use)
-revert to thekla atlas because xatlas is not working well
2018-09-30 23:11:24 -03: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
Rémi Verschelde
d3f01a2281
Style: Run clang-format on recent shader changes
2018-09-30 16:31:46 +02:00
Juan Linietsky
ce8294986d
Some more GLES2 tuning..
2018-09-29 23:47:24 -03:00