1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice
Like RaceDepartment on Facebook.

Reflections on the glasses and wheels

Discussion in 'Racer Problems & Fixes' started by Eholov, Apr 2, 2013.

  1. Reference a car like the Gallardo which I just updated, which might give you some clues to good texture and shader values.

    Dave
     
  2. Thank you. what am I doing wrong?

    Code:
    vf_glass
    {
      cast_shadow=0
      vertex_shader
      {
        file=dyn_standard_reflect_window_v.cg
      }
      fragment_shader
      {
        file=dyn_standard_reflect_transparency_window_f.cg
        ;file=dyn_standard_reflect_window_f.cg
      }
    }

    Code:
    shader_windows~vf_glass
    {
      sort_offset=2
      reflect=1
      shininess=16
      specular=0 0 0 0
      fresnel
      {
        bias=0.04
        scale=0.96
        power=4.5
      }
      layer0
      {
        map=windows.tga
        blendfunc=one src_alpha
      }
    layer1
      {
        map=$trackenvmap
      }
    }
    
    3.jpg
     
  3. Alexander Knoll

    Alexander Knoll
    NEVER GIVE UP!!

    hmm...not realy sure where your problem is...use the right material name and it works well...
    [​IMG]
    ...try

    Code:
    vidros
    instead of windows...

    for me it was a 3 min. job...if i'm not sure about material names i load the model in to racer modeler.exe and hit the "Make template shader" button...and voi la...

    ...oh and this is the shader i use, i'm sure not the best, but...

    Code:
    vf_reflect
    {
      vertex_shader
      {
        file=dyn_standard_reflect_v.cg
        ;file=dyn_standard_reflect_v.cg
      }
      fragment_shader
      {
        file=dyn_standard_reflect_f.cg
        ;file=dyn_standard_reflect_f.cg
      }
    }
    and

    Code:
    shader_vidros~vf_reflect
    {
      cull=none
      sort_offset=1
      reflect=0.4
      diffuse=1.0 1.0 1.0
      ambient=1.0 1.0 1.0
      cast_shadow=1
      layer0
      {
        map=windows.tga
        shininess=20
        blendfunc=blend
        specular=0.0 0.0 0.0 1.0
        depthwrite=0
      }
      layer1
      {
        map=$trackenvmap
        depthwrite=0
      }
    }
    ...have fun...
     
    • Like Like x 1
    • Like Like x 1