model in fog wont preserve texture?


    Jan 15 2013 | 4:53 pm
    Hello, I would like to add some cool fog effects to my models. the shader doesn't seem to preserve texture of my duck.dae,poor duck... how can I bind it into my shader ? here's the patch and the shader:
    -------------------------------------- -------------------------------------- mat.phong.1.light.fog.falloff.jxs --------------------------------------
    Ambient Multiplier Diffuse Multiplier Light Falloff Rate Fog Density Fog Density Fog Color Specular Multiplier Specularity Adjustment
    thank you in advance !!

    • Jan 15 2013 | 8:41 pm
      you have to add texture sampling to your shader,
      also you must provide the model's texture as an attribute to the gl.model object, since you are bypassing the internal material by specifying an external shader.
      fwiw, we are fixing a bug with the jit.gl.material fog implementation, which allows you to specify fog parameters directly to the internal materials. this will be in the next version.
      Ambient Multiplier Diffuse Multiplier Light Falloff Rate Fog Density Fog Density Fog Color Specular Multiplier Specularity Adjustment
    • Jan 15 2013 | 9:22 pm
      really nice !! thank you for your quick response tiouss