Sha256: 1e86dadf27a211caaf42088d21a1d0f2cb673e63cc62b77455f7012e73d5f2a3
Contents?: true
Size: 966 Bytes
Versions: 17
Compression:
Stored size: 966 Bytes
Contents
Jax.Material.ShadowMap = Jax.Class.create(Jax.Material, { initialize: function($super) { $super({shader:"shadow_map"}); }, setUniforms: function($super, context, mesh, options, uniforms) { $super(context, mesh, options, uniforms); uniforms.set({ DP_SHADOW_NEAR: 0.1, //c.world.lighting.getLight().getDPShadowNear() || 0.1;}}, DP_SHADOW_FAR: 500,//c.world.lighting.getLight().getDPShadowFar() || 500;}}, SHADOWMAP_PCF_ENABLED: false, SHADOWMAP_MATRIX: context.world.lighting.getLight().getShadowMatrix(), SHADOWMAP_ENABLED: context.world.lighting.getLight().isShadowMapEnabled() }); var light = context.world.lighting.getLight(), front, back; front = light.getShadowMapTextures(context)[0]; back = light.getShadowMapTextures(context)[1]; if (front) uniforms.texture('SHADOWMAP0', front, context); if (back) uniforms.texture('SHADOWMAP1', back, context); } });
Version data entries
17 entries across 17 versions & 1 rubygems