Meshes created with ShaderMaterial do not play skeletal animation?

Hello i cant create SSAO, Depth of field(Bokeh), NormalMaps etc, shaders with skinned skeletal meshes loaded with JSON loader? I cant create normalmap shader with SkinnedMesh, and there is no effect in post proccesing with SSAO.
The skinned mesh stuks in 1 frame of animation.

Author: Fantashit

3 thoughts on “Meshes created with ShaderMaterial do not play skeletal animation?

  1. Can you give an advise how to implement skinning into shader skin.
    http://necromanthus.com/Test/html5/Lara_shader.html

    vertexShader updated to work with r71.
    cheers

    After looking through hundreds of pages this is the first real example of how to do skinning with custom shaders in the material I’ve found. This example should be added to three.js examples and given the recognition it deserves. We newbies have a tough time getting these simple things to work and I really appreciate the effort. As a note, this needs the minified library (v77) to work: http://threejs.org/build/three.min.js

  2. Found a solution by re-inserting the shaderchunks in ShaderSkin.js:

        vertexShader: [
    
            "uniform vec4 offsetRepeat;",
    
            "varying vec3 vNormal;",
            "varying vec2 vUv;",
    
            "varying vec3 vViewPosition;",
    
            THREE.ShaderChunk[ "common" ],
            THREE.ShaderChunk[ "lights_pars" ],
            THREE.ShaderChunk[ "shadowmap_pars_vertex" ],
            THREE.ShaderChunk[ "morphtarget_pars_vertex" ],
            THREE.ShaderChunk[ "skinning_pars_vertex" ],
    
            "void main() {",
                "vec4 worldPosition = modelMatrix * vec4( position, 1.0 );",
    
                THREE.ShaderChunk[ "skinbase_vertex" ],
                THREE.ShaderChunk[ "begin_vertex" ],
                THREE.ShaderChunk[ "morphtarget_vertex" ],
                THREE.ShaderChunk[ "skinning_vertex" ],
                THREE.ShaderChunk[ "project_vertex" ],
    
                "vViewPosition = -mvPosition.xyz;",
    
                "vNormal = normalize( normalMatrix * normal );",
    
                "vUv = uv * offsetRepeat.zw + offsetRepeat.xy;",
    
                "gl_Position = projectionMatrix * mvPosition;",
    
                THREE.ShaderChunk[ "shadowmap_vertex" ],
    
            "}"
    
        ].join( "\n" )
    

Comments are closed.