* '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
3.0
Sha..rd 13 years ago
parent 55d75c5abc
commit 27e97c34da
  1. 3
      engine/src/core-data/Common/MatDefs/Blur/HGaussianBlur.j3md
  2. 3
      engine/src/core-data/Common/MatDefs/Blur/RadialBlur.j3md
  3. 3
      engine/src/core-data/Common/MatDefs/Blur/VGaussianBlur.j3md
  4. 2
      engine/src/core-data/Common/MatDefs/Light/Deferred.j3md
  5. 2
      engine/src/core-data/Common/MatDefs/Light/Lighting.j3md
  6. 4
      engine/src/core-data/Common/MatDefs/Misc/ColoredTextured.j3md
  7. 2
      engine/src/core-data/Common/MatDefs/Misc/Particle.j3md
  8. 2
      engine/src/core-data/Common/MatDefs/Misc/Sky.j3md
  9. 13
      engine/src/core-data/Common/MatDefs/Misc/Unshaded.j3md
  10. 3
      engine/src/core-effects/Common/MatDefs/Post/BloomExtract.j3md
  11. 3
      engine/src/core-effects/Common/MatDefs/Post/CartoonEdge.j3md
  12. 4
      engine/src/core-effects/Common/MatDefs/Post/CrossHatch.j3md
  13. 3
      engine/src/core-effects/Common/MatDefs/Post/DepthOfField.j3md
  14. 2
      engine/src/core-effects/Common/MatDefs/Post/FXAA.j3md
  15. 4
      engine/src/core-effects/Common/MatDefs/Post/Fade.j3md
  16. 4
      engine/src/core-effects/Common/MatDefs/Post/Fog.j3md
  17. 4
      engine/src/core-effects/Common/MatDefs/Post/GammaCorrection.j3md
  18. 3
      engine/src/core-effects/Common/MatDefs/Post/LightScattering.j3md
  19. 4
      engine/src/core-effects/Common/MatDefs/Post/Overlay.j3md
  20. 4
      engine/src/core-effects/Common/MatDefs/Post/Posterization.j3md
  21. 5
      engine/src/core-effects/Common/MatDefs/SSAO/ssao.j3md
  22. 5
      engine/src/core-effects/Common/MatDefs/SSAO/ssaoBlur.j3md
  23. 3
      engine/src/core-effects/Common/MatDefs/Water/SimpleWater.j3md
  24. 3
      engine/src/core-effects/Common/MatDefs/Water/Water.j3md
  25. 35
      engine/src/core-plugins/com/jme3/material/plugins/J3MLoader.java
  26. 9
      engine/src/core/com/jme3/material/Material.java
  27. 6
      engine/src/core/com/jme3/material/MaterialDef.java
  28. 5
      engine/src/niftygui/Common/MatDefs/Nifty/NiftyQuad.j3md
  29. 2
      engine/src/niftygui/Common/MatDefs/Nifty/NiftyQuadGrad.j3md
  30. 2
      engine/src/niftygui/Common/MatDefs/Nifty/NiftyTex.j3md
  31. 3
      engine/src/terrain/Common/MatDefs/Terrain/HeightBasedTerrain.j3md
  32. 3
      engine/src/terrain/Common/MatDefs/Terrain/Terrain.j3md
  33. 2
      engine/src/terrain/Common/MatDefs/Terrain/TerrainLighting.j3md

@ -15,7 +15,4 @@ MaterialDef Bloom {
WorldViewProjectionMatrix
}
}
Technique FixedFunc {
}
}

@ -30,7 +30,4 @@ MaterialDef Radial Blur {
WorldViewProjectionMatrix
}
}
Technique FixedFunc {
}
}

@ -15,7 +15,4 @@ MaterialDef Bloom {
WorldViewProjectionMatrix
}
}
Technique FixedFunc {
}
}

@ -55,7 +55,7 @@ MaterialDef Phong Lighting Deferred {
}
}
Technique FixedFunc {
Technique {
}
}

@ -275,7 +275,7 @@ MaterialDef Phong Lighting {
}
}
Technique FixedFunc {
Technique {
LightMode FixedPipeline
}

@ -2,7 +2,7 @@ MaterialDef Colored Textured {
MaterialParameters {
Texture2D ColorMap
Color Color
Color Color (Color)
}
Technique {
@ -14,7 +14,7 @@ MaterialDef Colored Textured {
}
}
Technique FixedFunc {
Technique {
}
}

@ -84,7 +84,7 @@ MaterialDef Point Sprite {
}
}
Technique FixedFunc {
Technique {
RenderState {
Blend AlphaAdditive
// DepthWrite Off

@ -22,6 +22,6 @@ MaterialDef Sky Plane {
SPHERE_MAP : SphereMap
}
}
Technique FixedFunc {
Technique {
}
}

@ -3,8 +3,8 @@ MaterialDef Unshaded {
MaterialParameters {
Texture2D ColorMap
Texture2D LightMap
Color Color ( Color )
Boolean VertexColor
Color Color (Color)
Boolean VertexColor (UseVertexColor)
Boolean SeparateTexCoord
// Texture of the glowing parts of the material
@ -30,6 +30,9 @@ MaterialDef Unshaded {
}
}
Technique {
}
Technique PreNormalPass {
VertexShader GLSL100 : Common/MatDefs/SSAO/normal.vert
@ -42,9 +45,7 @@ MaterialDef Unshaded {
}
RenderState {
}
}
@ -63,8 +64,4 @@ MaterialDef Unshaded {
HAS_GLOWCOLOR : GlowColor
}
}
Technique FixedFunc {
}
}

@ -37,7 +37,4 @@ MaterialDef Bloom {
DO_EXTRACT : Extract
}
}
Technique FixedFunc {
}
}

@ -42,7 +42,4 @@ MaterialDef Cartoon Edge {
Resolution
}
}
Technique FixedFunc {
}
}

@ -34,8 +34,4 @@ MaterialDef CrossHatch {
WorldViewProjectionMatrix
}
}
Technique FixedFunc {
}
}

@ -19,7 +19,4 @@ MaterialDef Depth Of Field {
WorldViewProjectionMatrix
}
}
Technique FixedFunc {
}
}

@ -15,6 +15,4 @@ MaterialDef FXAA {
Resolution
}
}
Technique FixedFunc {
}
}

@ -27,8 +27,4 @@ MaterialDef Fade {
WorldViewProjectionMatrix
}
}
Technique FixedFunc {
}
}

@ -32,8 +32,4 @@ MaterialDef Fade {
WorldViewProjectionMatrix
}
}
Technique FixedFunc {
}
}

@ -32,8 +32,4 @@ MaterialDef GammaCorrection {
COMPUTE_LUMA : computeLuma
}
}
Technique FixedFunc {
}
}

@ -35,7 +35,4 @@ MaterialDef Light Scattering {
WorldViewProjectionMatrix
}
}
Technique FixedFunc {
}
}

@ -29,8 +29,4 @@ MaterialDef Default GUI {
}
}
Technique FixedFunc {
}
}

@ -25,8 +25,4 @@ MaterialDef Posterization {
WorldViewProjectionMatrix
}
}
Technique FixedFunc {
}
}

@ -43,9 +43,4 @@ MaterialDef SSAO {
}
}
Technique FixedFunc {
}
}

@ -49,9 +49,4 @@ MaterialDef SSAOBlur {
RESOLVE_DEPTH_MS : NumSamplesDepth
}
}
Technique FixedFunc {
}
}

@ -28,7 +28,4 @@ MaterialDef Simple Water {
CameraPosition
}
}
Technique FixedFunc {
}
}

@ -84,7 +84,4 @@ MaterialDef Advanced Water {
}
}
Technique FixedFunc {
}
}

@ -66,7 +66,9 @@ public class J3MLoader implements AssetLoader {
private TechniqueDef technique;
private RenderState renderState;
private String shaderLang;
private String vertLanguage;
private String fragLanguage;
private String vertName;
private String fragName;
@ -86,18 +88,20 @@ public class J3MLoader implements AssetLoader {
// <TYPE> <LANG> : <SOURCE>
private void readShaderStatement(String statement) throws IOException {
String[] split = statement.split(":");
if (split.length != 2){
if (split.length != 2) {
throw new IOException("Shader statement syntax incorrect" + statement);
}
String[] typeAndLang = split[0].split(whitespacePattern);
if (typeAndLang.length != 2){
if (typeAndLang.length != 2) {
throw new IOException("Shader statement syntax incorrect: " + statement);
}
shaderLang = typeAndLang[1];
if (typeAndLang[0].equals("VertexShader")){
if (typeAndLang[0].equals("VertexShader")) {
vertName = split[1].trim();
}else if (typeAndLang[0].equals("FragmentShader")){
vertLanguage = typeAndLang[1];
} else if (typeAndLang[0].equals("FragmentShader")) {
fragName = split[1].trim();
fragLanguage = typeAndLang[1];
}
}
@ -399,11 +403,17 @@ public class J3MLoader implements AssetLoader {
private void readTechnique(Statement techStat) throws IOException{
String[] split = techStat.getLine().split(whitespacePattern);
if (split.length == 1){
if (split.length == 1) {
technique = new TechniqueDef(null);
}else if (split.length == 2){
technique = new TechniqueDef(split[1]);
}else{
} else if (split.length == 2) {
String techName = split[1];
if (techName.equals("FixedFunc")) {
throw new UnsupportedOperationException(
"In material: " + key + "\nThe 'FixedFunc' technique name no longer has any special meanining.\n"
+ "To support fixed pipeline mode, remove that technique's name entirely.");
}
technique = new TechniqueDef(techName);
} else {
throw new IOException("Technique statement syntax incorrect");
}
@ -412,14 +422,15 @@ public class J3MLoader implements AssetLoader {
}
if (vertName != null && fragName != null){
technique.setShaderFile(vertName, fragName, shaderLang);
technique.setShaderFile(vertName, fragName, vertLanguage, fragLanguage);
}
materialDef.addTechniqueDef(technique);
technique = null;
vertName = null;
fragName = null;
shaderLang = null;
vertLanguage = null;
fragLanguage = null;
}
private void loadFromRoot(List<Statement> roots) throws IOException{

@ -925,14 +925,7 @@ public class Material implements CloneableSmartAsset, Cloneable, Savable {
private void autoSelectTechnique(RenderManager rm) {
if (technique == null) {
// NOTE: Not really needed anymore since we have technique
// selection by caps. Rename all "FixedFunc" techniques to "Default"
// and remove this hack.
if (def.getTechniqueDef("FixedFunc") != null && !rm.getRenderer().getCaps().contains(Caps.GLSL100)) {
selectTechnique("FixedFunc", rm);
} else {
selectTechnique("Default", rm);
}
selectTechnique("Default", rm);
} else {
technique.makeCurrent(def.getAssetManager(), false);
}

@ -157,10 +157,10 @@ public class MaterialDef {
*
* @param technique The technique definition to add.
*/
public void addTechniqueDef(TechniqueDef technique){
if (technique.getName().equals("Default")){
public void addTechniqueDef(TechniqueDef technique) {
if (technique.getName().equals("Default")) {
defaultTechs.add(technique);
}else{
} else {
techniques.put(technique.getName(), technique);
}
}

@ -10,10 +10,9 @@ MaterialDef Default GUI {
WorldParameters {
WorldViewProjectionMatrix
}
}
}
Technique FixedFunc {
Technique {
}
}

@ -12,7 +12,7 @@ MaterialDef Default GUI {
}
}
Technique FixedFunc {
Technique {
}
}

@ -14,7 +14,7 @@ MaterialDef Default GUI {
}
}
Technique FixedFunc {
Technique {
}
}

@ -35,7 +35,6 @@ MaterialDef Terrain {
}
}
Technique FixedFunc {
Technique {
}
}

@ -27,7 +27,6 @@ MaterialDef Terrain {
}
}
Technique FixedFunc {
Technique {
}
}

@ -232,7 +232,7 @@ MaterialDef Terrain Lighting {
}
}
Technique FixedFunc {
Technique {
LightMode FixedPipeline
}

Loading…
Cancel
Save