diff --git a/jme3-core/src/main/java/com/jme3/scene/debug/SkeletonInterBoneWire.java b/jme3-core/src/main/java/com/jme3/scene/debug/SkeletonInterBoneWire.java index ccf97aa2e..7367ff512 100644 --- a/jme3-core/src/main/java/com/jme3/scene/debug/SkeletonInterBoneWire.java +++ b/jme3-core/src/main/java/com/jme3/scene/debug/SkeletonInterBoneWire.java @@ -73,7 +73,6 @@ public class SkeletonInterBoneWire extends Mesh { } this.setMode(Mode.Points); - this.setPointSize(1); this.boneLengths = boneLengths; VertexBuffer pb = new VertexBuffer(Type.Position); diff --git a/jme3-core/src/main/java/com/jme3/scene/debug/SkeletonPoints.java b/jme3-core/src/main/java/com/jme3/scene/debug/SkeletonPoints.java index ef6a36fcc..4d95d34b2 100644 --- a/jme3-core/src/main/java/com/jme3/scene/debug/SkeletonPoints.java +++ b/jme3-core/src/main/java/com/jme3/scene/debug/SkeletonPoints.java @@ -84,7 +84,6 @@ public class SkeletonPoints extends Mesh { pb.setupData(Usage.Stream, 3, Format.Float, fpb); this.setBuffer(pb); - this.setPointSize(7); this.updateCounts(); } diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md index bc5af58a7..826a44e45 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.j3md @@ -5,6 +5,7 @@ MaterialDef Unshaded { Texture2D LightMap Color Color (Color) Boolean VertexColor (UseVertexColor) + Float PointSize : 1.0 Boolean SeparateTexCoord // Texture of the glowing parts of the material @@ -71,6 +72,7 @@ MaterialDef Unshaded { HAS_COLORMAP : ColorMap HAS_LIGHTMAP : LightMap HAS_VERTEXCOLOR : VertexColor + HAS_POINTSIZE : PointSize HAS_COLOR : Color NUM_BONES : NumberOfBones DISCARD_ALPHA : AlphaDiscardThreshold @@ -176,6 +178,7 @@ MaterialDef Unshaded { HAS_GLOWCOLOR : GlowColor NUM_BONES : NumberOfBones INSTANCING : UseInstancing + HAS_POINTSIZE : PointSize } } } \ No newline at end of file diff --git a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.vert b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.vert index ba7899ca5..6550aaebc 100644 --- a/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.vert +++ b/jme3-core/src/main/resources/Common/MatDefs/Misc/Unshaded.vert @@ -16,6 +16,7 @@ varying vec2 texCoord1; varying vec2 texCoord2; varying vec4 vertColor; +uniform float m_PointSize; void main(){ #ifdef NEED_TEXCOORD1 @@ -30,6 +31,10 @@ void main(){ vertColor = inColor; #endif + #ifdef HAS_POINTSIZE + gl_PointSize = m_PointSize; + #endif + vec4 modelSpacePos = vec4(inPosition, 1.0); #ifdef NUM_BONES Skinning_Compute(modelSpacePos); diff --git a/jme3-examples/src/main/java/jme3test/model/anim/TestAnimBlendBug.java b/jme3-examples/src/main/java/jme3test/model/anim/TestAnimBlendBug.java index 54948ef02..b57fc83cb 100644 --- a/jme3-examples/src/main/java/jme3test/model/anim/TestAnimBlendBug.java +++ b/jme3-examples/src/main/java/jme3test/model/anim/TestAnimBlendBug.java @@ -115,7 +115,8 @@ public class TestAnimBlendBug extends SimpleApplication implements ActionListene SkeletonDebugger skeletonDebug = new SkeletonDebugger("skeleton1", control1.getSkeleton()); Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mat.getAdditionalRenderState().setWireframe(true); - mat.setColor("Color", ColorRGBA.Green); + mat.setColor("Color", ColorRGBA.Red); + mat.setFloat("PointSize", 7f); mat.getAdditionalRenderState().setDepthTest(false); skeletonDebug.setMaterial(mat); model1.attachChild(skeletonDebug); diff --git a/jme3-examples/src/main/java/jme3test/model/anim/TestOgreComplexAnim.java b/jme3-examples/src/main/java/jme3test/model/anim/TestOgreComplexAnim.java index 6717f5a20..fa1283540 100644 --- a/jme3-examples/src/main/java/jme3test/model/anim/TestOgreComplexAnim.java +++ b/jme3-examples/src/main/java/jme3test/model/anim/TestOgreComplexAnim.java @@ -106,6 +106,7 @@ public class TestOgreComplexAnim extends SimpleApplication { Material mat = new Material(assetManager, "Common/MatDefs/Misc/Unshaded.j3md"); mat.getAdditionalRenderState().setWireframe(true); mat.setColor("Color", ColorRGBA.Green); + mat.setFloat("PointSize", 7f); mat.getAdditionalRenderState().setDepthTest(false); skeletonDebug.setMaterial(mat);