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
Dominique LaSalle
f39d14dd61
Fix gles3 shader to actually multiply specular light by rev_amount for fog calculations.
2018-10-22 21:09:34 -07:00
Ferenc Arn
35ea827e83
Avoid some unnecessary calculations in scene.glsl.
2018-10-11 10:34:37 -04:00
Juan Linietsky
e0871b0f52
Baker fixes
2018-10-07 11:18:44 -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
Juan Linietsky
0de8309b2c
Many fixes to GLES2 renderer, fixed compilation issues in GLES3 shaders.
2018-09-29 13:49:34 -03:00
Rémi Verschelde
60312915dc
Fix build after 65fd37c1
, using Math_PI
...
Also fix style in shaders.
2018-09-23 18:26:57 +02:00
Juan Linietsky
65fd37c149
-Rewrote GLES2 lighting and shadows and optimized state changes, did many optimizations, added vertex lighting.
...
-Did some fixes to GLES3 too
2018-09-23 12:14:50 -03:00
Rémi Verschelde
4226d56ca9
Style: Enable clang-format on GLSL shaders
...
As of clang-format 6.0.1, putting the `/* clang-format off */` hint
around our "invalid" `[vertex]` and `[shader]` statements isn't enough
to prevent a bogus indent of the next comments and first valid statement,
so we need to enclose that first valid statement in the unformatted chunk.
2018-08-27 07:34:14 +02:00
Rémi Verschelde
1b6d75a599
Style: Fix code formatting in GLES3 shaders
2018-08-24 13:42:18 +02:00
Nick Hahn
66eba18969
Fix handling of normals that approach 1
2018-08-12 12:45:43 +02:00
Hugo Locurcio
31c12f05c4
Tweak the default SpatialMaterial properties
...
Roughness is now set to 1 by default and albedo is now white,
even on meshes that do not have any materials defined.
This means there is no longer a visual difference between a
mesh with no materials defined and a mesh with a default
SpatialMaterial defined.
2018-08-07 17:04:30 +02:00
Juan Linietsky
4b549faaab
transmission was broken, fix was made. Also fixed treshold.
2018-07-22 14:04:11 -03:00
Juan Linietsky
ad88979841
Fix opaque pre pass not casting shadows
2018-07-22 13:18:27 -03:00
Alex Roman
2ce1118faa
Add disable ambient light flag to shaders and materials
2018-07-17 21:30:43 +02:00
Rémi Verschelde
92bfde531c
Merge pull request #19786 from JFonS/correct_normal_scaling
...
Add render mode to ensure correct normals when using non-uniform scaling
2018-07-04 15:09:59 +02:00
Juan Linietsky
7fc2367508
Added ability for SSAO to affect AO textures too
2018-07-02 16:50:52 -03:00
JFonS
c8cf71753c
Add render mode to ensure correct normals when using non-uniform scaling
2018-06-21 00:12:12 +02:00
JFonS
9c307d4b6c
Added flag on SpatialMaterial to disable shadows
2018-03-29 18:46:42 +02:00
AndreaCatania
252344f706
Fixed graphic artifact caused by anisotropic filter
2018-01-11 12:55:18 +01:00
Bastiaan Olij
ebc96195d8
Clamp blend to fix screen space reflections
2018-01-10 23:23:00 +11: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
d72a32bc54
Use better initialization value for normalmap, fixes #14720
2018-01-06 18:09:11 -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
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
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
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
Juan Linietsky
f3ad14224e
-Add lightmapper
...
-Fixes to unwrapper (remove degenerates), makes Thekla not crash
-Added optional cancel button in EditorProgress
-Added function to force processing of events (needed for cancel button)
2017-12-14 09:01:27 -03:00
Rémi Verschelde
663f7e6a61
Fix usage of signed type in skeleton shader
...
The resulting primitive is drawn as GL_UNSIGNED_SHORT, so uvec4 should be used.
Fixes #12804 .
2017-12-10 13:58:36 +01:00
Juan Linietsky
8c78ccb027
After a lot of trial and error, i think rim lighting implementation is now perfect, closes #13986
2017-12-08 11:09:03 -03:00
Juan Linietsky
8717afbfe1
Added small bit of bias depending on lenght for contact shadows, fixes #12726
2017-12-07 16:19:35 -03:00
Juan Linietsky
e8494f7ab7
Fixed rim lighting glitch, closes #13340 , closes #13986
2017-12-06 14:30:49 -03:00
Rémi Verschelde
9b9fcb1977
Disable invariant gl_Position to workaround Mesa bug 100316
...
Fixes #13450 , though it would be worth reverting if/when the Mesa bug is fixed.
2017-12-03 15:05:39 +01:00
Juan Linietsky
0243803117
Properly take into consideration that VERTEX must be written to in opaque pre pass, does some speed up to scenes using triplanar.
2017-12-01 08:45:36 -03:00
Rémi Verschelde
4a1d1cbbb4
Merge pull request #13290 from Chaosus/projectionfix
...
Fix invalid transform when skip_vertex_transform used
2017-11-26 21:31:02 +01:00
Chaosus
284f8f6d91
Fixed invalid transform when skip_vertex_transform used
2017-11-26 22:02:40 +03:00
volzhs
b97e87480e
Fix shader compilation fail on Android
...
Error message from logcat
**ERROR**: SceneShaderGLES3: Fragment Program Compilation Failed:
50:471: S0032: no default precision defined for parameter 'probe'
At: drivers/gles3/shader_gles3.cpp:167:_display_error_with_code() - SceneShaderGLES3: Fragment Program Compilation Failed:
2017-11-27 01:15:39 +09:00
Juan Linietsky
9738ebcda0
-Fixed height fog (was broken)
...
-Make sure materials are named in OBJ importer, so they can be saved outside as resources.
2017-11-25 12:32:41 -03:00
Ferenc Arn
6e68c86ba6
Add viewport to the other SceneData struct.
...
This was missed in #12288 .
2017-10-30 20:48:33 -04:00
Juan Linietsky
4785e66eea
Merge pull request #12288 from tagcup/expose_viewport_size
...
Expose VIEWPORT_SIZE in shader language.
2017-10-30 19:32:21 -03:00
Ferenc Arn
a0fc641f25
Expose VIEWPORT_SIZE in shader language.
...
Fixes #11710 .
2017-10-26 15:00:28 -04:00
Rémi Verschelde
abea816e54
Revert "Rename Schlick GGX to GGX."
2017-10-23 07:42:36 +02:00
Ferenc Arn
fd166d6fda
Partially undo #11807 .
...
Specular light at zero roughness needs some discussion. Until we do that, this fixes #12309 .
2017-10-22 16:18:54 -04:00
Rémi Verschelde
d60b774924
Merge pull request #12297 from tagcup/clearcoat_fix
...
Don't add clearcoat BRDF to specular light as-is.
2017-10-22 13:18:24 +02:00
Ferenc Arn
06fcbe0092
Don't add clearcoat BRDF to specular light as-is.
...
BRDF needs to be multiplied with N.L, the incoming light and attenuation. Also specular_blob_intensity should affect clearcoat.
2017-10-21 20:25:17 -04:00