48 Commits

Author SHA1 Message Date
joliver82
663c9776e8 Android openGL ES 3 support (#1147)
* Update GLImageFormats.java

* Added basic support for openGL ES 3.0 and GLSL300 for android

Added instancing support for android which is core feature in GLES3.0

Added fix for shadows in android

* Fixed required types of GLES30.glDrawElementsInstanced

* Properly check GLES3 version and setting precision for shaders for all GLSL ES versions

* Added support for Opengl ES 3.1 and 3.2 and their shader versions
Added proper checkings for new OpenGL ES versions
Fixed some issues with shadow rendering in GLES 3.0 or better (strict type checking, OpenGL ES specific extensions and percision definition)
Added GLSL320 and GLSL300 to Unshaded and Lighting materials

* Added depth texture 24bit for OpenGL ES

* Added geometry shaders and tessellation to GLES 3.1 as extension and GLES 3.2 as core
Modified test materials to use GLSL310

* Added FB blit for android GLES30

* Added GlSL300 or better to all effects not able to run in GLSL100
Mods on Shadows.glsllib to try to fix android shadow rendering
Fixed ssaoBlur.frag that was using a reserved word
Fixed precision type missmatch from vertex to fragment shader

* Partial multisample support
Framebuffer MRT support

* Temporarily removed texture multisampling (not being able to compile using GLES31)

* Updated android.jar to api28
Enabled multisampling

* Better checking for GLES3

* Removed insert precision for all shaders. This avoided some random precision missmatch error but created rendering issues

* Removed border check for GLES, caused filtered shadows not to render on GLES2.0 devices

Added texture compare mode for GLES3.0 and better to be able to use sampler2DShadow

Modified base materials (Lighting and Unshaded) to use only GLSL100 for post shadow pass

* Corrected texture comparison function that were incorrectly changed

* Added precision to samplers for GLESSL300 also

* Created a subclass of Glsl150ShaderGenerator (Glsl300ShaderGenerator) to support ShaderNodes in GLES SL30 and included it's usage in DesktopAssetManager. Nowadays just copied and overwrote the version string. Needs a full review
Added image format RGB16F to be used as texture format only in GLES30 (cannot be used as FB format)
Added GLSL300 and/or GLSL310 to different materials

* Cleaned GLSL300 generator
Fixed shadows glsl lib removing use of GL_EXT_gpu_shaders5

* Fixed usag of textureCubeLod in fragment shader of envMapping which is unsupported in GLES2.0
Modified PBRLighting frag to properly compile on GLES3

* Added GLSL300 and 310 to PostShadowFilter material definition

* Make post shadow filter use GLSL100 for GLSL300
Set highp as default precision to fix glitched shadows caused because not enough precision

* Changed water_normalmap.dds to uncompressed RGB8 because DXT1 is mostly unsupported in GLES

* Fixed GLES30 compilation issues in Water shaders and added GLSL300 to LightScattering material. ** Not fully tested

* Added RGB8 dds formatted FullskiesSunset to be used in any platform. Previous file moved to _dtx1.dds

* Set GL_TEXTURE_MAX_LEVEL in GLES30 contexts fixing issue with not fully mipmapped images and PBR rendering

* Fixed compilation of jme3-android-examples and upgraded sdk version to use

* Fixed Geometry Shader and Tessellation Shaders in testdata package to properly compile on GLES320

* Added non-compressed textures to be able to run all examples on android

Enabled texture arrays and 3d textures on opengl es 3.0. Peding to implement wrappers to android gl functions (currently getting NullPointerException)

* More GLES30 functions included to properly support texture arrays, 3d textures and multisampling matching jme core code

* Fixed 3D texture tests for GLES30
Fixed texture 3D and texture array example shader compilation on GLES30
Fixed some random missing precision compilation errors on GLES30

* Fixed TestTextureArray for GLES30

* Some multisample additions and removal of GLES3 multisampling enable caps
Added RGBA16F as valid format for GLES32 and using it by default in env camera instead of RGB16F. kept fall back to RGB8

* added float and half float formats for gles30
added rgb10a2 format for gles30
fixed usage of glTexImage2D
removed EnvironmentCamera fallback image format as it's useless now

* Added more image formats for GLES30
Fixed rgb8 if having Caps.Rgba8

* Enabled RadialBlur for gles30

* Fixed luminance texture formats for gles

* Added more depth image formats for gles3

* Enabled multisampling in gles3

* Added GLES30 functions to GLDebugES
Reverted TestTexture3D and TestTextureArray to use RGB8 format
Updated EnvMapping100.frag to use EXT_shader_texture_lod in gles sl 100 if available

* Removed all aditional not used compressed dds files
Removed also Pond and rock png files previously used in TestTextureArray

* Removed compressed water_normalmap_dxt1.dds

* Changed GLES_30 and AndroidGL implementing GL2 to avoid duplicated code checking GL2 vs GLES30

* Added aditional checking to avoid gles30 calls from gles20 only devices
2019-11-16 08:24:30 +03:30
Lou Hamersly
cde108c2c0 #1107-Fix Javadoc warnings in OpenJDK 9+ 2019-06-05 08:21:34 -07:00
Stephen Gold
7ad91651f1 jme3-desktop/jme3-effects JavaDoc corrections (comments only) 2019-02-25 23:43:05 -08:00
Paul Speed
81667f8f45 Fixed the DepthOfFieldFilter to properly get the near/far distance from JME
instead of having it hard-coded.  Previous behavior caused focus to go all out
of whack if you ever changed the near/far plane (and even the default hard-coded
value was not the same as JME's default camera setup.)
While I was here, I made the unfocus threshold configurable and added a debug
toggle that will turn the 'unfocus' amount into grayscale color for better visualizing
where unfocusing is happening.
2018-03-17 02:18:31 -04:00
Stephen Gold
f40ba25a56 correct more grammar/spelling errors in comments 2018-02-23 22:20:22 -08:00
Stephen Gold
826908b042 correct more grammar/spelling errors in comments 2018-02-18 20:49:43 -08:00
Stephen Gold
36847602a5 correct more typographical errors in comments 2018-02-17 19:03:49 -08:00
Stephen Gold
b159c847cc comment corrections: mostly spelling and grammar 2018-01-16 18:35:07 -08:00
Kirill Vainer
b56e321218 Avoid calculating whitepoint for each sample for HDR (#722)
* Avoid calculating whitepoint for each sample for HDR
2017-09-17 23:03:39 -04:00
Alexandr Brui
6e5e85f7ac Update the water filter (#693)
WaterFilter now serializes the different textures textures, and can optionally serialize the reflection scene
2017-07-31 22:48:53 +02:00
RemboL
2ff0bf5f75 fixing documentation link 2017-06-25 08:54:04 +02:00
Yan
8e45937974 Fix issue #654
Fix issue #654
2017-05-15 11:06:35 +08:00
mitm001
80bec2e7a0 Updated broken link to point to wiki. 2017-05-11 07:31:52 -07:00
Nehon
1eb894111a Fixed a crash in ssao.frag when enabling multisampling 2017-02-05 17:57:28 +01:00
Nehon
6b33ae470a Added a new step in AppProfiler for viewport processors and added method to pass the profiler to all processors. 2017-02-05 17:57:28 +01:00
Nehon
390d35180b Soft particles now has only one shader and one technique to work with any glsl version 2017-01-24 20:06:12 +01:00
Rémy Bouquet
4c664f8df3 Merge pull request #603 from JavaSaBr/fix_editing_color_overlay_filter
Fix editing color overlay filter
2017-01-23 08:33:09 +01:00
Nehon
f7181c38dc Removed all xxx15.frag shaders and used GLSLCompat to have the same shader whatever version it's used for 2017-01-22 14:08:22 +01:00
javasabr
e7d95ee734 to prev 2017-01-22 09:59:50 +03:00
javasabr
56fc653725 fixed editing of color overlay filter 2017-01-22 09:58:24 +03:00
Nehon
d537a1c22e Added a GLSL150 to most of the shaders used in the engine (except deprecated ones).
All shaders now import the GLSLCompat.glsllib
2017-01-15 19:02:10 +01:00
Nehon
e89e0e7c12 Added a way to approximate the normals for the SSAO filter instead of rendering an additional geometry pass. 2016-08-06 15:16:29 +02:00
Riccardo Balbo
62d92d75ca Use texture() instead of texture2D() in bloomExtract15 and bloomFinal15 2016-07-19 12:40:16 +02:00
Nehon
60a031dc02 Fixed an issue in the fog filter's shader that was preventing it to run on android 2016-05-19 18:54:57 +02:00
Daniel Johansson
e530fa644b Merged with master after pull. 2016-03-07 16:36:43 +00:00
Daniel Johansson
93ac80d44f Fixed an issue with SSAO normal.vert throwing an error when using instancing. 2016-03-07 16:33:57 +00:00
Rémy Bouquet
b746c71441 Used the instancing transformation method for the normal pass in SSAO as it was producing a crash when instancing was enabled. 2016-03-04 14:12:33 +01:00
Daniel Johansson
109c5e80cf Fixed #316 where some post processing effects were not working when using OPENGL_3 renderer due to an error in the fragment shader. 2015-09-24 13:41:22 +01:00
Kirill Vainer
4a37a8f851 FXAA: quality regression fix
FXAA wants input texture to use bilinear filtering
so it can be smoothed further, so allow filters to
request bilinear filtering.
2015-09-22 22:09:38 -04:00
Kirill Vainer
ca6b492cea SSAOFilter: remove excessive GPU mipmap generation (not needed for filters) 2015-04-24 23:46:56 -04:00
Nehon
f73c2b379d Fixed water filter's glsl 100 shader 2015-04-17 16:06:51 +02:00
shadowislord
9ad1992681 SimpleWaterProcessor: Use linear filtering for reflection / refraction textures 2015-02-21 15:39:58 -05:00
shadowislord
8d406380b0 * Fix FXAA on Android (but it's not really noticeable .. pixels are too small) 2014-11-07 20:58:58 -05:00
Nehon
73b7061b0b Fixed a typo in the setSubPixelShift in the FXAA filter that was causing a crash 2014-10-29 09:11:28 +01:00
pspeed42
1f795a7485 Forgot some other water height specific things that need
to be initialized.
2014-09-16 00:06:02 -04:00
pspeed42
45591c99a1 Fixed a broken water height initialization issue that I
inadvertently caused with my previous cleanup.
2014-09-16 00:03:22 -04:00
pspeed42
a47fb27e56 WaterUtils tries to hard to avoid allocation... I
fixed three cases that were causing new Vector3fs
to be created.
2014-08-12 04:06:07 -04:00
pspeed42
1185d2099b Avoid some teeny-tiny per frame allocations by
only creating a new Plane() and setting the water
height uniform when the water height changes.
Also got rid of the redundant dot() product and
Vector3f allocation in the process.
2014-08-12 03:13:16 -04:00
pspeed42
61cbf16ebc Fixed the duplicate definition errors in normal.vert
...I left them commented out for reference and because
maybe this needs some rethinking.
2014-07-10 03:57:00 -04:00
Nehon
7356b727c3 Instancing now works with Lighting material, and shadows are supported with instanced geometries 2014-06-29 18:41:32 +02:00
shadowislord
406d244e01 * ToneMap.frag: Fix warning about gl_FragColor when compiling for GLSL 1.5 and higher 2014-06-03 23:09:01 -04:00
shadowislord
3838216207 * Added tone mapping filter that does not rely on average luminance (unlike HDRProcessor). 2014-05-30 23:54:56 -04:00
Nehon
9f45f78c86 Fixed GammaCorrectionFilter path to j3md and frag files 2014-05-26 12:16:16 +02:00
Nehon
8ff6f8df24 Introduced a new Enum ColorSpace.
One can now mark a texture param in a material definition as linear by using -Linear at the end of the parameter declaration (case insensitive).
An Image bound to a material texture param in a linear color space will have its ColorSpace set to linear when bound to the material by mat.setTexture("name", texture);
Added the -LINEAR flag to all texture param that needed it in stock materials (lighting.j3md, terrainLighting.j3md, different Filter materials).
2014-05-26 12:11:57 +02:00
Nehon
0967f39b83 - Fixed the GammaCorrectionFilter so it properly works with multisampling, will be used as a fall back to upcoming Gamma Correction implementation
- Removed luma
- Passed inverse gamma instead of gamma to avoid doing a division for each pixel in the shader
2014-05-26 12:11:54 +02:00
Nehon
1b3c2e4436 Fixed some compilations warning in the lightScattering shaders and a compilation error in the glsl 1.2 shader 2014-04-13 20:15:19 +02:00
Nehon
333c5c60cd Fixed wrong swizzle in ssao.frag 2014-03-31 06:53:05 +02:00
Normen Hansen
a16857c8f4 switch to gradle layout 2014-03-21 02:32:11 +01:00