Moving 3D textures shaders to blender packages.

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8349 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Kae..pl 14 years ago
parent 19597f2c1f
commit 7492410485
  1. 7
      engine/src/blender/Common/MatDefs/Texture3D/tex3D.frag
  2. 16
      engine/src/blender/Common/MatDefs/Texture3D/tex3D.j3md
  3. 11
      engine/src/blender/Common/MatDefs/Texture3D/tex3D.vert
  4. 2
      engine/src/blender/com/jme3/scene/plugins/blender/materials/MaterialHelper.java

@ -0,0 +1,7 @@
uniform sampler3D m_Texture;
varying vec3 texCoord;
void main(){
gl_FragColor= texture3D(m_Texture,texCoord);
}

@ -0,0 +1,16 @@
MaterialDef My MaterialDef {
MaterialParameters {
Texture3D Texture
}
Technique {
VertexShader GLSL100: jme3test/texture/tex3D.vert
FragmentShader GLSL100: jme3test/texture/tex3D.frag
WorldParameters {
WorldViewProjectionMatrix
}
}
}

@ -0,0 +1,11 @@
uniform mat4 g_WorldViewProjectionMatrix;
attribute vec3 inTexCoord;
attribute vec3 inPosition;
varying vec3 texCoord;
void main(){
gl_Position = g_WorldViewProjectionMatrix * vec4(inPosition,1.0);
texCoord=inTexCoord;
}

@ -237,7 +237,7 @@ public class MaterialHelper extends AbstractBlenderHelper {
//creating the material
if(colorTextureType==Type.ThreeDimensional) {
result = new Material(blenderContext.getAssetManager(), "jme3test/texture/tex3D.j3md");
result = new Material(blenderContext.getAssetManager(), "Common/MatDefs/Texture3D/tex3D.j3md");
} else {
if (materialContext.shadeless) {
result = new Material(blenderContext.getAssetManager(), "Common/MatDefs/Misc/Unshaded.j3md");

Loading…
Cancel
Save