106 Commits

Author SHA1 Message Date
shadowislord
564a08672f * Remove InstancedNode.setCullHint(CullHint.Never) from TestInstancedNode example as it is not neccessary 2014-06-28 19:34:53 -04:00
shadowislord
eee43b470e * Added InstancedNode: easy to use instancing with similar API to BatchNode. The underlying scene graph will be automatically optimized so instancing is used as much as possible, thus reducing number of draw calls and improving performance. Unlike BatchNode, it does not copy the geometry's mesh around, but only its transform. In order for it to work, it requires the Renderer to support the GeometryInstancing capability.
* Replaced existing instancing test with TestInstanceNode, which demostrates how to use the new InstancedNode by changing the transform, mesh, and material of every instance periodically.
 * The lower-level InstancedGeometry API rewritten: Users don't need to manage the number of instances they have and their indices. Instead, they can use addInstance() and removeInstance() to add and remove instances as desired. Unlike InstancedNode, InstancedGeometry requires all Geometries to have the same mesh and material, but they can have different transforms.
 * Instancing.glsllib now requires the InstanceData to have world transforms instead of world view transforms. As a consequence, users of instancing must specify in the material the world parameters ViewProjectionMatrix and ViewMatrix instead of ProjectionMatrix.
2014-06-28 19:27:26 -04:00
shadowislord
52b93ba933 * Made Geometry.associate/unassociate To/From GroupNode methods public so they can be GeometryGroupNode implementations outside the com.jme3.scene package
* Added ability to get the geometry start index for GeometryGroupNode implementations
2014-06-28 19:15:39 -04:00
shadowislord
5b7a408bcc * Fix issue where BatchNode.clone() would still re-use the previous BatchNode's data structures 2014-06-28 19:09:20 -04:00
shadowislord
ef1e69c182 * Instanced objects are now considered a single object when generating rendering statistics 2014-06-28 19:05:04 -04:00
Blay09
ce1eba944e Fix error dialog being displayed in a headless context.
This was causing an infinite cycle of java.awt.HeadlessException in case handleError was called in an environment without display.
2014-06-28 20:25:30 +02:00
neph1
8738f961ea This is the long-overdue initial check in of KinematicRagdollControl with IK support. It also contains some modifications to Bone. Tested with TestBoneRagdoll to ensure backwards compatibility. Please review. 2014-06-28 14:58:57 +02:00
neph1
ed6256ef47 Fix for handling multiple channels in AnimationEvent
new constructor (variant)
(First commit in github repo)
2014-06-28 12:57:18 +02:00
Nehon
330b53671a Upped JME version to 3.1.0 with the tag "snapshot-github"
Somehow trying to get nightly back...
2014-06-18 21:51:45 +02:00
Nehon
3f43d7832f Updated documentation of the Bone class and changed names of the transforms variables and accessors so that they properly describe what they are an are misleading anymore.
Kept old methods as deprecated to not break user code.
Changed all calls to the deprecated methods in the engine.
2014-06-17 22:08:55 +02:00
Nehon
6d9a7fbcfb Fixed issue in shadows15.glsllib, edge bilinear filtering was wrong when using tetxureGather 2014-06-14 22:05:53 +02:00
shadowislord
d3ba691600 * Introduce GeometryGroupNode as abstract class for implementations that group / optimize geometries
* Reimplement BatchNode on top of GeometryBatchNode
2014-06-07 18:34:37 -04:00
Nehon
d8bbb4e9f9 Fixed an issue where you couldn't chain several shadow renderers. Thanks to Perjin for narrowing down the issue.
Now a shadow renderer properly cleanup the parameters set to a material when the post shadow pass in done
2014-06-07 21:27:10 +02:00
shadowislord
67f402df75 * Remove use of instance variable in BIHTree, instead use TempVars 2014-06-07 15:26:04 -04:00
shadowislord
17fd3d466e * Fix Remy's grammar and spelling 2014-06-06 20:09:20 -04:00
shadowislord
844e468eac * Fix two more un-compliant PostShadow shaders 2014-06-05 23:40:34 -04:00
shadowislord
bd500608dd * Fix "m_LightPos redefined" shader compile error in PostShadow.vert 2014-06-05 23:25:32 -04:00
shadowislord
be3a6c03b2 * Put comment markers around imported library contents when loading shader 2014-06-05 23:16:10 -04:00
shadowislord
ad7fdb6fab * Deprecate texture wrap modes not supported in OpenGL 3
* Make sure engine is not using them anywhere
2014-06-05 22:51:51 -04:00
shadowislord
c925104f5e * Ensure the statistics properly represent number of objects / triangles / vertices rendered when using instancing 2014-06-05 22:37:00 -04:00
shadowislord
948fdb21eb * Add new flag to Platform enum which specifies if its 32-bit platform or 64-bit.
* Add new but currently unused native extraction engine which supports user-specified native libraries as well as deferred extraction of libraries.
2014-06-05 22:32:06 -04:00
shadowislord
65d83b37f0 * Deprecated LTC and LATC texture formats, OpenGL3+ does not support them. Instead RGTC / BC5 must be used.
* Add missing license to InstancedGeometry.
 * Minor cosmetic / doc changes.
2014-06-03 22:58:33 -04:00
shadowislord
bf9a30f8ba Merge pull request #140 from phr00t/master
Ability to emit a certain number of particles
2014-06-02 12:04:52 -04:00
Phr00t
dd042344d8 reduced code duplication 2014-06-02 09:12:39 -04:00
Phr00t
0f76dc2cbd Ability to emit a certain number of particles 2014-06-01 16:46:52 -04:00
shadowislord
76147fc5f7 * Throw exception if the spot light computed cosine angle is not valid 2014-06-01 14:32:49 -04:00
shadowislord
6680a1dec4 * FilterPostProcessor now crashes early if packed float texture isn't supported - since it is now required by all filters 2014-05-31 19:11:50 -04:00
shadowislord
0989d40256 * Ensure mipmapping is disabled for skies 2014-05-31 18:51:22 -04:00
shadowislord
99af4d9bd5 * Deprecate usage of TextureKey.setAsCube() and TextureKey.setAsTexture3D() - this is now handled by the TextureKey.setTextureTypeHint() method instead 2014-05-31 18:39:44 -04:00
shadowislord
6b12d5c638 * Fix many javadoc errors mostly related to incorrect HTML or missing references 2014-05-31 13:12:46 -04:00
shadowislord
81498d6f79 * Introduce Image.isNPOT() which is now used to check if the image is non-power-of-2 in renderer implementations. 2014-05-31 12:27:31 -04:00
shadowislord
35cfae5ef0 * Merge revision 11058 from experimental branch
- Add instanced geometry support. This is performed by uploading 4 vertex buffers each containing 4 floats. The top 3 rows are the world matrix and the bottom row is a quaternion representing the normal matrix. Hence, both unshaded and lit geometries can be rendered through instancing.
See Instancing.glsllib for more information as well as the comment in LwjglRenderer.
2014-05-31 11:46:58 -04:00
shadowislord
6aeb694b71 * Merge revision 11060 from experimental branch
- Throw exception if user is attempting to share materials between hardware skinned models
2014-05-31 10:54:36 -04:00
shadowislord
97ff9c2949 * Allow MultiSample.glsllib to be used on GLSL shaders versions 1.00 - 1.40 (otherwise a syntax error occurs) 2014-05-30 23:32:02 -04:00
Nehon
c09a4b208d Fixed ColorRGBA javadoc, made the clamp method use FastMath.clamp, integrated @kwando's pull request 131 2014-05-26 12:20:58 +02:00
Nehon
200c875ba2 Used R11G11B10F instead of RGB10_A2 for framebuffer format in Filters and R11G11B10F instead of RGBA for the back buffer in the FilterPostProcessor. 2014-05-26 12:19:20 +02:00
Nehon
0c469e605b ColorRGBA now has a setAsSrgb that convert the passed sRGB values to linear space and store them in the ColorRGBA, it has also a getAsSrgb method that returns the SRGB value of the color in a Vector4f. 2014-05-26 12:18:13 +02:00
Nehon
09e705dcc4 Introduced RGB10_A2 Image Format. It offers greater precision for RGB channels at the expense of precision for the alpha channel. This format is convenient for post processing, and especially when gamma correction is turned on. 2014-05-26 12:16:15 +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
e4ba4e9e9e - Image loaders now assume ALL images are in sRGB space and set the flag accordingly
- All images constructors now take the isSrgb flag as a parameter, all engine classes has been changed to accommodate the change, old constructors has been deprecated for backward compatibility. One should always ask himself in which color space is an image if dealing with gamma correction
- Gamma correction has been defaulted to false in the appSettings
2014-05-26 12:11:56 +02:00
Nehon
77a4002c3d Added support for hardware srgb output (gamma correction).
It can be toggled at render time.
Works with lwjgl
Couldn't test with Jogl and might be not working
Not supported by mobile renderers
2014-05-26 12:11:55 +02:00
Nehon
a23038430c - Added an AppSetting param for gamma correction, defaulted to true.
- Added a filed in the Setting dialog to toggle gamma correction on and off
2014-05-26 12:11:55 +02:00
sgold@sonic.net
98ffe52c77 correct core comments and standardize line endings as discussed at http://hub.jmonkeyengine.org/forum/topic/typos-in-com-jme3-mathrendererpost/ 2014-05-25 08:54:49 -07:00
sgold@sonic.net
4a69eee64f corrections to com.jme3.scene.* comments as discussed at http://hub.jmonkeyengine.org/forum/topic/typos-in-com-jme3-scene/ 2014-05-16 07:58:15 -07:00
sgold@sonic.net
5b8dfbc27c typos in Spatial.java comments as discussed at http://hub.jmonkeyengine.org/forum/topic/typos-in-spatial-java-comments/ 2014-05-13 10:22:53 -07:00
Nehon
5f48fa34bd Made a MaterialDebugAppState that allows hot reload of materials at runtime. Pretty convenient for shader development and debugging 2014-05-11 15:25:38 +02:00
Nehon
3a5aae5383 Fixed typo in previous commit's javadoc 2014-05-03 15:05:56 +02:00
Nehon
375079bfcf The shaderNodesGenerator now properly declare and assign inPosition :
inPosition can be a vec4 or Vec3 and will be assign to Global.position accordingly
2014-05-03 15:03:30 +02:00
Nehon
e898f26cf4 The ShaderNodes system now correctly handles swizzle of types like ivecn, uvecn, bvecn 2014-05-03 13:49:05 +02:00
Rémy Bouquet
d5f6058e85 Merge pull request #129 from Rena4ka/master
Fixed constantly mipmap generation
2014-05-01 11:16:46 +02:00