Sha256: 6fae3d3df023f01c6386d70391f9726e5e878ff8c67eba1097330921395b926d

Contents?: true

Size: 565 Bytes

Versions: 17

Compression:

Stored size: 565 Bytes

Contents

Jax.Material.NormalMap = Jax.Class.create(Jax.Material, {
  initialize: function($super, map) {
    this.map = Jax.Material.Texture.normalizeTexture(map);
    $super({shader:"normal_map"});
  },
  
  setUniforms: function($super, context, mesh, options, uniforms) {
    $super(context, mesh, options, uniforms);
    uniforms.texture('NormalMap', this.map, context);
  },
  
  setAttributes: function($super, context, mesh, options, attributes) {
    $super(context, mesh, options, attributes);
    attributes.set('VERTEX_TANGENT', mesh.getTangentBuffer());
  }
});

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
jax-1.1.1 builtin/app/shaders/normal_map/material.js
jax-1.1.0 builtin/app/shaders/normal_map/material.js
jax-1.1.0.rc1 builtin/app/shaders/normal_map/material.js
jax-1.0.1 builtin/shaders/normal_map/material.js
jax-1.0.1.rc2 builtin/shaders/normal_map/material.js
jax-1.0.1.rc1 builtin/shaders/normal_map/material.js
jax-1.0.0 builtin/shaders/normal_map/material.js
jax-0.0.0.10 builtin/shaders/normal_map/material.js
jax-0.0.0.9 builtin/shaders/normal_map/material.js
jax-0.0.0.8 builtin/shaders/normal_map/material.js
jax-0.0.0.7 builtin/shaders/normal_map/material.js
jax-0.0.0.6 builtin/shaders/normal_map/material.js
jax-0.0.0.5 builtin/shaders/normal_map/material.js
jax-0.0.0.4 builtin/shaders/normal_map/material.js
jax-0.0.0.3 builtin/shaders/normal_map/material.js
jax-0.0.0.2 builtin/shaders/normal_map/material.js
jax-0.0.0.1 builtin/shaders/normal_map/material.js