Commit graph

410 commits

Author SHA1 Message Date
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
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
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