58 Commits

Author SHA1 Message Date
Sha..om
3bceee24fb * Fixed syntax error due to implicit float -> vec3 conversion in PostShadowPSSM15.frag
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9134 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-02-04 05:17:45 +00:00
nor..67
697d23ddc0 - fix FXAA shader BlindCoding(TM) bug
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9096 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-01-18 01:36:13 +00:00
sha..rd
d0699f5c60 * FXAA now supports baseline GLSL 1.00 instead of GLSL 1.3
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9095 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-01-18 01:14:06 +00:00
sha..rd
e9a28ced31 * Cleaned up FXAA shader, moved requirement to GLSL 1.3, removed dependency on EXT_gpu_shader4
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9094 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-01-18 00:07:40 +00:00
Sha..rd
8d7aed43d1 * Removed useless vPosition varying from Lighting shader
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9009 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-01-09 04:36:04 +00:00
sha..rd
dcb71def31 * Specular color is now black by default
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8333 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-10-02 19:15:38 +00:00
Sha..om
d38b469de6 * Fix for "Internal error wrong operand type built in unary operator function. Type: in sampler2DMS" if multisample is not being used (old ATI driver bug)
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8326 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-10-02 04:42:11 +00:00
sha..rd
c8f96e47a4 * Fixed Lighting.frag compile error when using vertex lighting
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8291 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-09-24 18:00:14 +00:00
nor..67
2eca2f0bdd - fix some int * float errors in Parallax.glsllib, still crashing on mac due to lines 39/42
com.jme3.renderer.RendererException: compile error in:ShaderSource[name=Common/MatDefs/Light/Lighting.frag, defines, type=Fragment] error:ERROR: 0:45: Call to undeclared function 'texture2DLod'

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8260 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-09-16 22:22:07 +00:00
rem..om
1ca81c3355 Added GammaCorrectionFilter contributed by phate666
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8256 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-09-16 08:56:59 +00:00
sha..rd
dd7495185c * Do not use control flow in GLSL version 1.0 in Lighting.frag
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8170 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-09-04 06:08:48 +00:00
sha..rd
f421e2a876 * Removed shiny check in Lighting.frag (for ATI Radeon X1600 and similar)
* Applying default values for materials inside old J3O files
 * Default shininess in TerrainLighting

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8163 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-09-03 22:39:02 +00:00
rem..om
367c9c3799 Fixed typo in FXAA filter
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8087 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-08-25 16:25:52 +00:00
rem..om
5f5eb708da - Added steep parallax mapping, activate it by setting SteepParallax attribute to true in lighting material
- Refactored paralax calculation code in Parallax.glsllib
- Added a boolean param to lighting material PackedNormalParallax to specify if the parallax map is stored in the alpha channel of the normal map (it was already implemented in the shader). added a dds file and a material using this
- The parallax height can now be set by users by setting the ParallaxHeight attribute. default is 0.05
- Deleted old normal map for water
- Inverted green channel of the brickwall normal texture to look good with recent change in normal calculation in lighting material
- Created a test case for parallax mapping where you can swich from classic to steep parallax using spacebar, and where you can tweak the parallax heigh by using I and K keys.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8046 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-08-20 21:42:47 +00:00
rem..om
75b320b7d6 Better normal map for water
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8044 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-08-20 13:41:03 +00:00
sha..rd
db0a4f23a8 * New block language parser
* Rewrote J3M loader
 * AssetManager.unregisterLocator() must be implemented
 * Added support for material default vars
 * Apply NVIDIA spot light fix for TerrainLighting

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8024 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-08-17 03:25:48 +00:00
sha..rd
2636343ac7 * Fix hard edge bug for spot lights on NVIDIA cards
* Fix bump mapping issue that was there since the beginning of time ... flipping normal.y only worked for pond_normal.png texture and IS NOT CORRECT in most cases. Now the texture itself has been adjusted to be correct while the flipping of normal.y removed
 * Fix crash when playing sound in simpleInitApp()
 * Fix issue where Spatial.setModelBound() would do absolutely nothing
 * Skies created via SkyFactory now don't suffer from "premature culling" bug

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8010 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-08-14 18:36:59 +00:00
sha..rd
e5be9cef83 Lighting material
* Hopefully fix incorrect parallax map 
 * Multiply specular by diffuse factor to prevent physically impossible shininess (compare TestNormalMapping to understand the difference)

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8006 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-08-13 19:02:29 +00:00
rem..om
10366623f7 Added FXAA filter to the core thanks to phate666 for its implementation
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7992 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-08-09 15:37:58 +00:00
rem..om
20f5e9d200 Fixed vertex lighting broken since last spot light changes
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7981 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-08-06 07:44:43 +00:00
rem..om
9e5f9be5ec SpotLight : reduced the number of float varying by 5 in the shaders :
- computed the spotDirection in view space on the java side in Material and pass it as a uniform -> vec4 spotVec disapear
- this implies to decode the cos values for falloff in the frag shader instead of the vert shader, but allows to reduce light vec from vec4 to vec3

All in all it shouldn't be that much of a performance hit, since the matrix multiplication of spotVec occur once per geometry instead of once per vertex, we could go further and compute it once per frame.
On the other hand decoding of the cos values happens once for each pixel instead of once for each vertex ( a floor a mult and a fract). I guess this should be balanced in a rich scene.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7978 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-08-05 17:03:46 +00:00
sha..rd
7308cdfca6 * Fixed issue with spot light shader not taking into account alpha
* Reduced number of varyings by 2 in lighting shader 

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7909 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-24 03:56:30 +00:00
rem..om
e6c2653fe6 Fixed varrying binding in the lighting shader
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7898 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-22 09:00:59 +00:00
nor..67
58d485467a - fix lighting compile error
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7894 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-22 00:15:55 +00:00
rem..om
99a4b00c15 - Added SpotLight light type.
- Implemented spot light shading for lighting (pixel and vertex lighting) and terrain shader

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7893 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-21 21:58:46 +00:00
rem..om
6c80e0a558 WaterFilter : tracked down missing ".0" in the shaders
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7862 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-15 16:01:37 +00:00
sha..rd
80ac165e67 * Removed evil code
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7846 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-09 20:08:22 +00:00
sha..rd
a24becee32 * Replaced all usages of ByteBuffer.allocateDirect() with BufferUtils.create***Buffer() so that memory can be tracked
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7845 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-09 20:02:39 +00:00
sha..rd
f8df2f00cc * Fixed syntax errors and crashes with shadow processor and filters
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7831 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-06 01:40:42 +00:00
sha..rd
235646f38f * Minor shader formatting
* Particles now have proper glow
 * Fixed bug where references to static variables would stay in ParticleEmitter and particleInfluencer, causing havoc
 * Fixed warning in InputManager when using ScreenshotAppState
 * TestEverything now uses TangentBinormalGenerator, since before there was no tangents for the floor

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7821 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-05 03:47:29 +00:00
sha..rd
108e124323 * Fix shader compile error in Sky.frag
* Fix shader compile error in PostShadowPSSM.vert

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7795 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-01 17:09:00 +00:00
sha..rd
7314c5f613 * Fix lighting "early cull" issue for terrain lighting shader as well
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7794 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-01 17:01:00 +00:00
sha..rd
f41584e966 * Applied abies fix to Sky rotation
* Blender importer now puts transparent materials in the transparent queue bucket
 * Blender importer creates RGBA8 textures as a result of blending
 * Blender importer - all textures are now mipmapped by default 
 * Lighting shader now supports lightmap
 * Fixed GLSL 1.5 warnings
 * Ogre3D materials now use glow color as emissive color 
 * MaterialLoader will now only load first texture unit instead of last
 * All XML loaders are now namespace aware by default so that android can properly load XML

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7792 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-07-01 00:33:39 +00:00
sha..rd
a43e52a384 * XMLImporter can now read directly from file
* XML representation of savable now writes version (no reading yet)
 * Initial attempt of fixing "frozen after app restart" bug
 * Fixed NVIDIA shininess bug (!!!) - No longer need to set m_Shininess on materials!

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7734 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-06-25 23:26:48 +00:00
sha..rd
9f7d5410b7 * Tried to fix NVIDIA shininess==0 bug (again!)
* MTL loader now properly follows spec regarding initial values of colors
 * TangentBinormalGenerator now throws proper exception on missing normals

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7730 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-06-25 19:27:23 +00:00
sha..rd
951d9fe23a J3O incompatibility issues fixed
* When loading models with SimpleTextured/WireColor/SolidColor materials 
 * When loading Unshaded material with spelling error "SeperateTexCoord" instead of "SeparateTexCoord"
 * Also fixed issue with loading animated models

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7729 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-06-25 18:47:20 +00:00
rem..om
602a5099f3 Water Filter :
- fix for glsl 1.0 shader
- better caustics color management
- added a couple of paramters to tweak, underWaterFogDistance, causticsIntensity

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7608 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-06-13 08:39:48 +00:00
rem..om
10efb37490 Water Filter : removed textureOffset from glsl 1.0 shader
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7600 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-06-12 21:11:33 +00:00
rem..om
95e709f820 Water Filter : underwater shader
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7599 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-06-12 19:49:13 +00:00
sha..rd
d03683deca * SimpleTextured, SolidColor, VertexColor, and WireColor are now obsolete. Using those materials will crash your application.
* Additional javadocs for Material
 * Added TestMusicStreaming

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7591 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-06-12 02:35:19 +00:00
sha..rd
39e3e2d11f * Fix spelling error in Unshaded material Seperate => Separate, hopefully no-one was using it as otherwise it would break a lot of things
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7553 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-06-07 01:48:35 +00:00
rem..om
2d4896942d TranslucentBucket :
- Added a translucent bucket that is rendered after the processors (usefull for shadows)
- For filters, rendering this bucket is a bit particular, so you can use the TranslucentBucketFilter to render the translucent bucket in the middle of the fillter stack (doc is comming up in the wiki)
- renamed Filter's preRender method to postQueue for consistancy with processors
- added translucent objects in TestPostWater, added a fire (particles) in test transparent shadows

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7540 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-05-31 06:51:51 +00:00
rem..om
29a4e7e01c Fixed shader compilation failure when using glow map and unshaded material
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7539 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-05-31 06:30:14 +00:00
sha..rd
3678d4d4a3 * Attempt to fix some ATI driver crash on PostShadowPSSM15
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7493 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-05-14 21:58:12 +00:00
rem..om
9c3b269061 WaterFilter : reduced foam texture size
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7454 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-05-05 16:15:52 +00:00
sha..rd
b06652b6a8 * Fix issue 179, shadows and HDR don't work together (thanks spencers)
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7304 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-04-25 01:49:19 +00:00
sha..rd
edd5aaaeb5 * CrossHatch filter should now properly compile on ATI
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7292 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-04-23 03:13:05 +00:00
sha..rd
6ed32b479c * Updated to latest version of Nifty GUI 1.3
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7270 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-04-20 15:35:34 +00:00
sha..rd
3b9cf4cd35 * Updated Particle.j3md so it works on pre GLSL 1.2 graphics cards
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7229 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-04-11 19:11:02 +00:00
sha..rd
53da7c4de4 * Added CCD threshold to BoneRagdoll test so that balls collide more often
* Reduced BoneRagdoll constraints to PI/8
 * Added an ambient light so the ragdoll is more visible
 * Fixed bug with Unshaded.j3md failing with glow map

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7224 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-04-10 21:03:55 +00:00