|
|
@ -36,23 +36,21 @@ public class ShaderCheck { |
|
|
|
private static void checkMatDef(String matdefName){ |
|
|
|
private static void checkMatDef(String matdefName){ |
|
|
|
MaterialDef def = (MaterialDef) assetManager.loadAsset(matdefName); |
|
|
|
MaterialDef def = (MaterialDef) assetManager.loadAsset(matdefName); |
|
|
|
for (TechniqueDef techDef : def.getDefaultTechniques()){ |
|
|
|
for (TechniqueDef techDef : def.getDefaultTechniques()){ |
|
|
|
if (techDef.isUsingShaders()){ |
|
|
|
DefineList dl = new DefineList(); |
|
|
|
DefineList dl = new DefineList(); |
|
|
|
dl.addFrom(techDef.getShaderPresetDefines()); |
|
|
|
dl.addFrom(techDef.getShaderPresetDefines()); |
|
|
|
ShaderKey shaderKey = new ShaderKey(techDef.getVertexShaderName(), |
|
|
|
ShaderKey shaderKey = new ShaderKey(techDef.getVertexShaderName(), |
|
|
|
techDef.getFragmentShaderName(), |
|
|
|
techDef.getFragmentShaderName(), |
|
|
|
dl, |
|
|
|
dl, |
|
|
|
techDef.getVertexShaderLanguage(), |
|
|
|
techDef.getVertexShaderLanguage(), |
|
|
|
techDef.getFragmentShaderLanguage()); |
|
|
|
techDef.getFragmentShaderLanguage()); |
|
|
|
Shader shader = assetManager.loadShader(shaderKey); |
|
|
|
Shader shader = assetManager.loadShader(shaderKey); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (Validator validator : validators){ |
|
|
|
for (Validator validator : validators){ |
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
StringBuilder sb = new StringBuilder(); |
|
|
|
validator.validate(shader, sb); |
|
|
|
validator.validate(shader, sb); |
|
|
|
System.out.println("==== Validator: " + validator.getName() + " " + |
|
|
|
System.out.println("==== Validator: " + validator.getName() + " " + |
|
|
|
validator.getInstalledVersion() + " ===="); |
|
|
|
validator.getInstalledVersion() + " ===="); |
|
|
|
System.out.println(sb.toString()); |
|
|
|
System.out.println(sb.toString()); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|