* Formatting and names in ShaderDebug
* Remove shininess=0 in TestParallax, its bad git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9554 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
28926b8383
commit
9b9fa57de4
@ -77,7 +77,6 @@ public class TestParallax extends SimpleApplication {
|
|||||||
mat = assetManager.loadMaterial("Textures/Terrain/BrickWall/BrickWall2.j3m");
|
mat = assetManager.loadMaterial("Textures/Terrain/BrickWall/BrickWall2.j3m");
|
||||||
mat.getTextureParam("DiffuseMap").getTextureValue().setWrap(WrapMode.Repeat);
|
mat.getTextureParam("DiffuseMap").getTextureValue().setWrap(WrapMode.Repeat);
|
||||||
mat.getTextureParam("NormalMap").getTextureValue().setWrap(WrapMode.Repeat);
|
mat.getTextureParam("NormalMap").getTextureValue().setWrap(WrapMode.Repeat);
|
||||||
mat.setFloat("Shininess", 0);
|
|
||||||
|
|
||||||
// Node floorGeom = (Node) assetManager.loadAsset("Models/WaterTest/WaterTest.mesh.xml");
|
// Node floorGeom = (Node) assetManager.loadAsset("Models/WaterTest/WaterTest.mesh.xml");
|
||||||
//Geometry g = ((Geometry) floorGeom.getChild(0));
|
//Geometry g = ((Geometry) floorGeom.getChild(0));
|
||||||
@ -115,7 +114,6 @@ public class TestParallax extends SimpleApplication {
|
|||||||
public void simpleInitApp() {
|
public void simpleInitApp() {
|
||||||
cam.setLocation(new Vector3f(-15.445636f, 30.162927f, 60.252777f));
|
cam.setLocation(new Vector3f(-15.445636f, 30.162927f, 60.252777f));
|
||||||
cam.setRotation(new Quaternion(0.05173137f, 0.92363626f, -0.13454558f, 0.35513034f));
|
cam.setRotation(new Quaternion(0.05173137f, 0.92363626f, -0.13454558f, 0.35513034f));
|
||||||
|
|
||||||
flyCam.setMoveSpeed(30);
|
flyCam.setMoveSpeed(30);
|
||||||
|
|
||||||
|
|
||||||
@ -152,11 +150,6 @@ public class TestParallax extends SimpleApplication {
|
|||||||
}
|
}
|
||||||
}, "toggleSteep");
|
}, "toggleSteep");
|
||||||
inputManager.addMapping("toggleSteep", new KeyTrigger(KeyInput.KEY_SPACE));
|
inputManager.addMapping("toggleSteep", new KeyTrigger(KeyInput.KEY_SPACE));
|
||||||
FilterPostProcessor fpp = new FilterPostProcessor(assetManager);
|
|
||||||
FXAAFilter fxaa = new FXAAFilter();
|
|
||||||
fxaa.setReduceMul(0.08f);
|
|
||||||
fpp.addFilter(fxaa);
|
|
||||||
viewPort.addProcessor(fpp);
|
|
||||||
}
|
}
|
||||||
float parallaxHeigh = 0.05f;
|
float parallaxHeigh = 0.05f;
|
||||||
float time = 0;
|
float time = 0;
|
||||||
|
@ -43,25 +43,25 @@ public class ShaderDebug {
|
|||||||
* @param source the source
|
* @param source the source
|
||||||
* @return the formated source code
|
* @return the formated source code
|
||||||
*/
|
*/
|
||||||
public static String formatShaderSource(String defines, String source,String version) {
|
public static String formatShaderSource(String defines, String source, String version) {
|
||||||
String[] lines0 = version.split("\n");
|
String[] versionLines = version.split("\n");
|
||||||
String[] lines = defines.split("\n");
|
String[] definesLines = defines.split("\n");
|
||||||
String[] lines2 = source.split("\n");
|
String[] sourceLines = source.split("\n");
|
||||||
int nblines = 0;
|
int nblines = 0;
|
||||||
StringBuilder out = new StringBuilder();
|
StringBuilder out = new StringBuilder();
|
||||||
if (!version.equals("")) {
|
if (!version.equals("")) {
|
||||||
for (String string : lines0) {
|
for (String string : versionLines) {
|
||||||
nblines++;
|
nblines++;
|
||||||
out.append(nblines).append("\t").append(string).append("\n");
|
out.append(nblines).append("\t").append(string).append("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!defines.equals("")) {
|
if (!defines.equals("")) {
|
||||||
for (String string : lines) {
|
for (String string : definesLines) {
|
||||||
nblines++;
|
nblines++;
|
||||||
out.append(nblines).append("\t").append(string).append("\n");
|
out.append(nblines).append("\t").append(string).append("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (String string : lines2) {
|
for (String string : sourceLines) {
|
||||||
nblines++;
|
nblines++;
|
||||||
out.append(nblines).append("\t").append(string).append("\n");
|
out.append(nblines).append("\t").append(string).append("\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user