89 Commits

Author SHA1 Message Date
Stephen Gold
21425f81ef more comment corrections in jme3-core: mostly spelling and grammar 2018-01-16 18:03:05 -08:00
Stephen Gold
74d70c4ee0 comment corrections in jme3-core: mostly spelling and grammar 2018-01-15 22:01:33 -08:00
javasabr
43b52cb77c Fixed finding definitions during material loading. 2017-11-27 11:37:37 +01:00
javasabr
8674d8af4b fixed detecting varyings during loading shader nodes in the case, when we have several output parameters with the same name but with different name spaces. 2017-11-26 13:20:00 +01:00
javasabr
9578b0410e extended some things from shader node system. 2017-11-12 19:01:24 +01:00
Nehon
171007693b De duplicate imports when generating a shader from shader nodes 2017-10-28 18:16:17 +02:00
Alexandr Brui
556e3de1c0 fixed asset linked node to reuse shared data between loaded models. (#739)
* fixed asset linked node to reuse shared data between loaded models.
* updated implementation of binary loader.
2017-10-01 20:48:38 -04:00
Alexandr Brui
66137d53b8 added auto closing readers. (#738) 2017-09-21 15:33:12 -04:00
javasabr
fac8266b5c fixed two problems with asset manager:
1. can't load classes from asset class loaders.
2. can't load resources from asset class loaders.
2017-08-31 21:39:54 +02:00
Nehon
6ed4abf29e ShaderNodes: changed the way condition are used for variable declaration.
Before each input (attribute, varying or uniform) depending on a define was declared inside a #ifdef statement, it appears that most compiler will optimize out any input that has not been set so this computation was useless and costly and the code to to it was kind of ugly.
So basically now it's only done in very particular cases when it's really needed.
2017-07-18 21:09:19 +02:00
Nehon
5ac5731ebf Better error reporting when loading shaderNodeDefinition 2017-07-08 14:06:56 +02:00
Nehon
ee9c6d366a ShaderNodeVariable now has a prefix attribute that is concatenated to the name when generating the shader (basically g_ and m_ when the variable is an uniform)
It avoid to change the name of the variable when loading the definition and always have weird inconsistencies with mat params because the name has a m_ or not.
2017-06-02 00:37:01 +02:00
Nehon
2f06c9b37b ShaderNodeDefinition path is now set while loading the definition. 2017-06-02 00:37:01 +02:00
Nehon
26ccaaea88 DDSLoader now supports Luminance16f format (r16f) 2017-06-02 00:37:01 +02:00
Sebastian Weiß
02781e799f oh man, I should have learned it by now, that jme uses spaces, not tabs 2017-04-08 21:24:15 +02:00
Sebastian Weiß
04b0578173 Certain dds texture lack the DDSCAPS_TEXTURE-flag, but are still recognized by programs like IrfanView and can also be loaded in the engine.
This commit weakens the check for this flag: Instead of throwing an exception, a warning is logged.
2017-04-08 21:22:06 +02:00
Sebastian Weiß
a3cd3cbb04 Certain dds texture lack the DDSCAPS_TEXTURE-flag, but are still recognized by programs like IrfanView and can also be loaded in the engine.
This commit weakens the check for this flag: Instead of throwing an exception, a warning is logged.
2017-04-08 21:18:16 +02:00
Nehon
a64594eea9 Better cloning for TechniqueDefs 2017-01-20 23:33:17 +01:00
Nehon
b0ed053472 Fixed a cloning issue and some tests 2017-01-15 20:32:42 +01:00
Nehon
12a2f0f63c One can now define several versions for the shader in a Technique in a J3md file, ie:
VertexShader GLSL150 GLSL110 : "path/to/shader/file.vert"
FragmentShader GLSL150 GLSL110 : "path/to/shader/file.frag"

Versions must be separated with spaces. They will be matched together when creating the technique so they have to follow the same order for different shaders.
2017-01-15 18:57:53 +01:00
Nehon
4777c591b1 GLSLLoader now moves all extensions declaration found in the dependencies at the top of the shader code 2017-01-14 23:13:08 +01:00
Nehon
16023fa481 PBR has come
Merge branch 'PBRisComing'

# Conflicts:
#	jme3-core/src/main/java/com/jme3/material/Material.java
#	jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java
2016-07-07 20:36:31 +02:00
Dokthar
a52a51cb27 typo fix in materials & shaders, also fix some javadoc 2016-05-11 22:56:57 +02:00
Kirill Vainer
e71cf81b96 J3M: allow static pass lighting to be selected 2016-04-20 16:40:11 -04:00
Nehon
f70151f2c7 Merge branch 'master' into PBRisComing 2016-04-15 20:17:26 +02:00
Nehon
c859cf375c Fixed an issue with shaderNodes loading 2016-04-11 20:19:16 +02:00
Nehon
c7d264fe8e Merge branch 'master' into PBRisComing
# Conflicts:
#	jme3-core/src/plugins/java/com/jme3/material/plugins/J3MLoader.java
2016-04-11 19:09:52 +02:00
Kirill Vainer
cb61e760ce Merge branch 'master' into BorealFeast-master
Conflicts:
	jme3-core/src/main/java/com/jme3/material/RenderState.java
	jme3-core/src/main/java/com/jme3/renderer/opengl/GL.java
2016-04-10 12:51:19 -04:00
Kirill Vainer
8bd5b59a0e material: warn / ignore fixed function techniques 2016-04-10 12:16:35 -04:00
Kirill Vainer
b6729c46d4 code / comment cleanup 2016-04-10 12:15:01 -04:00
Kirill Vainer
876015ab47 deprecate alpha test / point sprite 2016-04-10 12:09:36 -04:00
Teencrusher
d1aae8d479 Added support to glBlendEquation for renderes implementing GL2, and material loading support 2016-04-06 13:56:13 -04:00
Nehon
0ec2263ae9 Merged master into PBR and migrated to TechniqueDefLogic 2016-04-05 21:51:26 +02:00
Kirill Vainer
280733c1ce material: move technique logic into its own package 2016-04-02 15:04:45 -04:00
Kirill Vainer
9d035f747a Add the new material system
Also includes some unrelated tests

Conflicts:
	jme3-core/src/main/java/com/jme3/renderer/RenderManager.java
	jme3-core/src/main/java/com/jme3/renderer/opengl/GLRenderer.java
2016-04-02 14:57:10 -04:00
Jan Ivenz
98a9f5c628 Fixed shader generation bug for array variables. 2016-03-30 21:58:27 +02:00
Nehon
754c256a66 Merge branch 'master' into PBRisComing 2016-03-25 23:50:19 +01:00
Nehon
493855bac9 LineWidth is now a RenderState parameter, One can change the lineWidth used to render a mesh wireframe or a mesh in Lines mode by using material.getAdditionalRenderState().setLineWidth(value) 2016-03-20 21:36:28 +01:00
Nehon
cb56fd88eb For some reason the J3MLoader never loads the material name. Not that it's really important, but since we have the name field... let's read it... 2016-03-11 17:45:29 +01:00
Daniel Johansson
9f9cb824cd Fixed an issue with J3MLoader thinking certain texture path patterns with new texture options still looked like old style and hence ignoring new options and getting the texture path wrong. 2016-03-07 16:38:43 +00:00
Nehon
cedb4d3c3e Merge branch 'master' into PBRisComing 2015-11-20 09:00:23 +01:00
Nehon
50a9a8636b HDRLoader, reverted the change that loaded the HDR files in sRGB space, since the specs says that data is in linear space for this format. 2015-11-20 08:59:42 +01:00
Nehon
aa067ef60d Merge branch 'master' into PBRisComing 2015-11-17 14:55:36 +01:00
Nehon
ad4634ce04 .hdr files are now loaded in sRGB color space as there is no reason it should be loaded in linear space. 2015-11-17 14:54:59 +01:00
Rémy Bouquet
c47da8e9a1 Merge branch 'master' into PBRisComing
* master: (94 commits)
  First attempt to fix a bug reported by david_bernard_31, the size of the strings in the shader code was wrongly computed for the JOGL backend
  Allows to choose between the forward compatible profile and the backward compatible profile in the JOGL backend
  Displays the JOGL version instead of the NEWT version
  Updates JOGL (2.3.2)
  Bugfix: fix to importing blend files with linked content.
  native loader: set lwjgl library path for lwjgl3
  Updated lwjgl3 module to use LWJGL 3.0.0b #35 which is the current stable build.
  Change duplicated docstring in FlyByCamera.unregisterInput
  light : fixed pointLight v. bounding sphere unit test
  light : replaced duplicated code by methods from Intersection
  Removed native library jemalloc.dll for LWJGL3 as this will not be needed until 3.0.0b and after.
  light : added unit tests for the new support of bounding spheres intersections (for lightFilter)
  Fixed Issue #46 : The MaterialViewer will now simply ignore not available textures instead of crashing
  Lights (see #362) : added light v. sphere intersection, and implementations of intersectsSphere(), second attempt
  GImpactCollisionShape : fix for #188, added a call to updateBound() in native jni binding, just after creating the shape, (native createShape() method)
  Bugfix: fixed a bug that caused importer to crash when the author of the blend file assigned non existing UV coordinates group name to a mesh.
  Bugfix: fixed a bug that caused subdivision surface modifier to crash if at least one not connected vertex was in the mesh.
  The LWJGL 3 renderer was missing a call to GLContext.createFromCurrent(), sorted now.
  Changed the default app title in AppSettings to use the full name string from JmeVersion. This way no more manual changing of this will be needed for future versions. This also closes #320 which highlighted this issue. Thanks @8Keep.
  Fixed #316 where some post processing effects were not working when using OPENGL_3 renderer due to an error in the fragment shader.
  ...
2015-11-02 11:28:07 +01:00
Daniel Johansson
d319a7c5d3 Added unit test for J3MLoader to cover the new texture parameters available in #295. Also fixed a couple of issues in the code to reduce logging that was not needed and removed redundant code. This update also updates junit to 4.12 and adds Mockito and Fest Assertions as test dependencies. 2015-07-20 11:22:16 +01:00
Daniel Johansson
9059eb30e4 Added support for setting minification and magnification filters on a texture in the j3m material file. This also adds support for double and single quoted paths as well as being able to set WrapMode for a specific WrapAxis. This resolves #295 2015-07-14 22:28:13 +01:00
Nehon
327e0125d9 Merge branch 'master' into PBRisComing
Conflicts:
	jme3-core/src/main/java/com/jme3/material/Material.java
	jme3-core/src/main/java/com/jme3/material/TechniqueDef.java
2015-07-11 21:34:30 +02:00
Nehon
be58be75ef Merge branch 'master' into PBRisComing 2015-07-03 23:34:26 +02:00
David Bernard
fe72dd67dd add TechniqueDef.noRender 2015-07-03 20:49:20 +02:00