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
rem..om
512ebfaa1f
Fixed artifact on simple water for old intel card thanks to Androlo
...
http://jmonkeyengine.org/groups/graphics/forum/topic/fixed-problem-in-simple-water/#post-162943
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9145 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2012-02-11 16:56:12 +00:00
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