109 Commits

Author SHA1 Message Date
rem..om
f0aff05d41 ShaderNodes : UnshadedNodes now supports hardware skinning, and discard threshold
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10807 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-09-29 12:36:37 +00:00
rem..om
5bc840e57a Fixed an isse where shader compilation would fail for shadows because of deprecated usage of varying in glsl1.5 shaders.
Alsofixed an issue with the filter version of the shadow processor

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10788 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-09-17 16:58:35 +00:00
rem..om
afa9376b26 - FilterPostProcessor no longer use a different camera to render the fulscreen quad. This greatly simplify the multiviewport filtering handling and global uniform matrix will now be usable in fliter's shaders, because it uses the same cam as the back buffer scene.
- Changed the post.vert and post15.vert to do a very basic projection to screen, saves a 16 float uniform and replace 4 matrices multiplication with 4 MAD operations per filter.
- Used ResolutionInverse instead of Resolution in FXAA to multiply instead of dividing once per pixel
- Same in CartoonEdge
- LightScattering now uses the standard post.vert and post15.vert
- Various cleanups in SSAO


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10750 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-08-26 16:17:48 +00:00
rem..om
2acbdf9f84 Hardware Skinning now uses its own bone index and bone weight buffers. The vertex buffers are initialized empty when the model is loaded and placed in the cache.
They are populated only if hardware skinning is used with the model.

BoneIndex and BoneWeight buffers are now always CpuOnly and only used for Software Skinning.
Some enhancement could be done to save memory by not generating the bindPose buffers if hardware skinning is used as it doesn't need them.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10657 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-06-22 10:03:40 +00:00
sha..RD
725fb33983 * Fixed bug where verts uninfluenced by bones would not work correctly in hardware skinning
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10633 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-27 21:29:35 +00:00
rem..om
f553d6a39a Fixed a typo in a comment in both lighting and unshaded.j3md, thanks to wezrule
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10590 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-03 18:47:42 +00:00
rem..om
706cd410b6 AlphaDiscardTreshold is now supported by the Unshaded material.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10588 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-05-03 18:15:07 +00:00
rem..om
c4fc9b723f Shadows, SSAO and CartoonEdge now works with HardWareSkinning
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10580 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-27 16:32:37 +00:00
ShA..Rd
1f27804716 * Fix issue where lighting shader would not compile when vertex lighting is used (due to recent HW skinning changes)
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10561 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-19 16:57:57 +00:00
sha..RD
b6afd61ef0 * Lighting shader now supports HW skinning
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10554 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-18 03:03:55 +00:00
sha..RD
d9e3af1795 * Unshaded material now supports HW skinning
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10553 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-18 03:02:55 +00:00
sha..RD
c21b60fbe7 HW Skinning
* Added check in shader for number of bones
 * Fix crash when Skinning.glsllib is imported by shader 
 * Fix incorrect transform of tangent vector in shader 

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10552 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-18 03:02:12 +00:00
sha..RD
bd9f389108 * Added joystick mappings for wireless Xbox 360 controller. Back shoulder buttons are not supported because its not possible to convert axis into button at the moment.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10546 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-17 03:50:28 +00:00
rem..om
eb5525e581 Hardware Skinning first commit, still non functionnal as no material implements it. also it's disabled by default in the skeleton control
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10537 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-13 11:17:21 +00:00
rem..om
85b3e7e8c5 Made soft particles work with MS anti aliasing
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10508 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-04-01 21:09:23 +00:00
rem..om
241cbce7e6 Shader Nodes implementation :
Sample Shader nodes and test material definition

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10434 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2013-02-26 19:39:18 +00:00
rem..om
3c84826db1 Shadows,fixed an issue when PolyOffset was not properly applied on lighting material
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10044 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-12-24 10:14:34 +00:00
rem..om
01bf1ca843 Fixed 2 issues with shadows :
- Looks like Poly offset behave defferently between ATI and NVIDIA i added a bit of offset to avoid shadow acne for NVIDIA
- Added a flag needCompareModeUpdate in the Texture class to avoid setting it on every frame in the renderer. I changed Lwjgl and Jogl renderer accordingly.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10043 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-12-23 13:55:17 +00:00
Zer..om
ecb8b0508d (Hopefully) Fixed a shader problem on macs where it was trying to multiply an int with a float...
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10021 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-12-05 13:05:59 +00:00
rem..om
84e4f0f8ad Ten thousand monkeys !!
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10000 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-11-16 21:22:15 +00:00
rem..om
0dadaa80f5 Shadow system refactoring.
- Basic and PSSM shadow renderer are now deprecated
- There is now one processor and its filter conterpart for each light type
- created an abstract shadow processor that hold the common shadowing code. It's totally independent of the shadow technique used.
- extracted the CompareMode and FilterMode enum to their own files.
- renamed FilterMode enum to EdgeFilteringMode
- refactored the shader code, to avoid duplicate code. all shadow related code is now gathered into Shadows.glsllib and Shadows15.glsllib.
- added spot light Shadows
- removed the ShadowCamera class as it was not used.
- removed "pssm" in the naming of classes, shader and shader libs since it's not relevant anymore

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9971 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-11-07 08:38:56 +00:00
rem..om
66ddbb654d Point light shadows first push. Working solution based on rendering 6 different shadow maps.
Made a PointlLightShadowRenderer and a PointLightShadowFilter.
- This will need a lot of refactoring as a lot of code is duplicated with the PSSMShadowRenderer
- Also i plan to change the Shadow map rendering to a cubemap instead of 6 separate textures.
Added a cornell box model and a test case


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9942 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-11-03 09:38:33 +00:00
rem..om
d1a036a021 Pssm now supports fade out of the shadows when using a zextend
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9929 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-10-31 15:53:33 +00:00
rem..om
a5b8b48ea1 fixed an isue in shadow shaders where shadows outside of the shadowZExtend were dark instead of light.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9905 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-10-26 16:20:31 +00:00
rem..om
cbafa1852b Shadows : There is now an alternative to the PssmRenderer : the PssmFilter that has to be used as any other filter. It does the same ass the PssmRenderer except the post shadow pass is done in screen space making it run very faster on scene that have a lot of shadow recieving Geometries.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9787 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-09-29 09:38:53 +00:00
PSp..om
f0d4f86dd8 Updates to use logical ID mapping instead of names.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9785 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-09-27 22:26:25 +00:00
PSp..om
4b4ae178e5 Added a basic way to have default remappings of
joysticks that properly report their name.  It's
a simple system using properties files on the
classpath.  A core file has been added with at
least one known remapping.
Buttons and axes can be renamed but they can't
yet be flipped.  If needed that can be added
later.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9774 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-09-25 06:31:25 +00:00
rem..om
d980519674 Re-introduced alphaDiscardThreshold in lighting frag
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9768 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-09-24 16:40:03 +00:00
rem..om
bdb715e527 Shadows : attempt two to fix them on mac.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9757 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-09-21 20:26:08 +00:00
rem..om
6c2dcc472d Lighting and Shadows :
- removed the const keyword for the poisson disk array declaration in the shader (attempt to fix the shader on mac)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9754 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-09-19 16:25:32 +00:00
rem..om
384f4ac1c2 Lighting and Shadows (PSSM only) :
- re introduced the alphaDiscardThreshold as explained in prvious commit. It's not binded to the AlphaTestFallOff fixedfunc binding
- Added a small poly offset to post shadow technique, this greatly help in fixing shadow acne.
- Added Poisson disc sampling PCF Filtering for shadows
- Properly passed the shadow map size as a define in the shaders and remove the hardcoded value
- Pssm15 don't use the textureSize function anymore and use the same shadow map size define ( this increased performance quite a bit)
- Optimized the shaders code a bit
- Better PSSM test

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9750 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-09-18 21:37:11 +00:00
Sha..rd
0a38ca0cf4 * GLSL spec allows having unset uniforms/attributes/varyings as long as they are not used in the shader, thus they are now always in scope
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9622 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-08-05 21:59:58 +00:00
rem..om
a38c61a65a Fixed syntax error in post shadow shader
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9573 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-07-20 21:21:39 +00:00
rem..om
28926b8383 WaterFilter can now have a square shape
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9553 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-07-10 22:19:03 +00:00
Sha..rd
27e97c34da * 'FixedFunc' technique were wiped out entirely. Not useful since now we choose default technique based on caps anyway.
^ Make sure to fix your materials by removing the 'FixedFunc' name from your fixed pipeline techniques! Or remove then entirely if the material doesn't support OpenGL1 ...

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9546 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-07-10 03:56:51 +00:00
Sha..rd
8d7b054b31 * Sky shader now normalizes direction in fragment shader instead of vertex shader
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9533 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-06-30 18:01:50 +00:00
Sha..rd
c498e79511 * Gui shader now supports vertex color on GL1
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9532 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-06-30 18:00:53 +00:00
rem..om
3f5fd9f6c3 Parallax mapping : changed calls to texture2DLod to texture2D as it fails on mac since it shouldn't be used in a frag shader
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9384 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-05-13 19:51:57 +00:00
rem..om
9d7d5a388c Shadows/SSAO and transparency : Removed the AlphaDiscardThreshold from the frag shaders
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9334 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-04-30 11:39:21 +00:00
rem..om
22edb7beb0 Shadows/SSAO and transparency : Removed the AlphaDiscardThreshold attribute from the lighting material. Transparency discarding is now handled by the AlphaFallOff render state (as it should be).
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9330 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-04-29 20:32:08 +00:00
ShA..Rd
ac59c1ffdf * Fix link error in glow material techniques
* DesktopAssetManager now works as before (flipY and generate mips options are enabled)
 * Fix crash in TestSimpleWater

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9322 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-04-19 02:25:10 +00:00
Sha..rd
60e0e46344 * Remove usage of "SimpleTextured" shaders from other materials
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9320 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-04-15 21:20:37 +00:00
Sha..rd
5d37b914e1 * Removed deprecated material definitions
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9315 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-04-14 20:19:13 +00:00
Sha..om
9aacd96926 * PostShadowPSSM: Made texSize const, to fix shader error
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9284 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-04-09 17:39:43 +00:00
rem..om
bf55974bf4 Changed the way post shadow pass is done. It's now a technique of the lighting material definition.
This allow to have shadows that fully works with partially transparent objects (like trees).
If a material does not have the postShadow technique, the renderer uses the fallback material (like before).

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9279 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-04-07 19:55:43 +00:00
rem..om
203bc00a7d Lighting material now normalize normal value read from the normal map to avoid banding artifacts
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9261 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-03-25 12:36:27 +00:00
rem..om
5671358657 Soft particles implementation.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9223 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-02-29 22:26:37 +00:00
Sha..rd
3dfe3d70f5 * Re-added conditional in Lighting.frag to avoid NVIDIA bug. It uses control flow but most GLSL compilers should optimize it to compare and set.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9204 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-02-25 19:51:35 +00:00
nor..67
9978684407 - move effects and networking to separate jar files
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9189 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-02-24 12:16:33 +00:00
rem..om
26ffa11655 - Fixed parallax distortion thanks to Survivor
- Used a quad in TestParallax instead of a grid

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9173 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-02-18 08:17:07 +00:00