[INCLUDE: common/selflighting.ini]
[INCLUDE: common/materials_interior.ini]
[INCLUDE: common/materials_carpaint.ini]
[INCLUDE: refraction.ini]
[INCLUDE: emissive.ini]

[SelfLight_Headlights]
BIND_TO_HEADLIGHTS=1
POSITION=0, 0.58, 1.92
MIRROR=0.61
DIRECTION=0, -0.2, 1
SPOT=60
COLOR=10,10,10, 10
RANGE=0.20
DIFFUSE_CONCENTRATION=1
AFFECTS_TRACK=1

[SelfLight_Headlights]
BIND_TO_EXTRA_A=1
POSITION= 0, 0.33, 1.97
MIRROR=0.55
DIRECTION=0, 0, 1
SPOT=110
COLOR=10,10,10, 10
RANGE=0.20
DIFFUSE_CONCENTRATION=1
AFFECTS_TRACK=1




[Material_CarPaint_Solid]
Materials = ext_carpaint
FresnelMax = 0.5
FresnelC = 0.08
AmbientSpecular = 0.3
SpecularBase = 0.2, 100


[BASIC]
BRAKES_THRESHOLD=0.01
ENGINE_STALLED_RPM_THRESHOLD=1
HAZARD_LIGHTS_ENGINE_LIFE_THRESHOLD=0.001
HEADLIGHTS_ARE_HEADLIGHTS=1
HORN_AS_SIREN=0
IS_LOW_BEAM_AVAILABLE=1
LIGHT_DAMAGE_SPEED_MAX=120
LIGHT_DAMAGE_SPEED_MIN=80
STOP_LODS_ADJUSTMENT=0
TURNING_LIGHTS_REPEAT=1

[BOUNCED_HEADLIGHTS]
ACTIVE=1
FADE_AT=200
FADE_SMOOTH=50
FALLOFF=0.4
GRADIENT_OFFSET=0.8
MULT=1, 1, 1, 1
OFFSET=7

[SHADOWED_WHEELS]
ANGLE=12
OFFSET=0
OPACITY=0.8
WIDTH=0.15

[SHADOWED_TYRES]
ANGLE=6
OFFSET=0
OPACITY=0.8
WIDTH=0.05
EXTRA_AMBIENT_BRIGHTNESS=0.0

[TYRES_FX]
DIRT_WIDTH_K=1.2

;Brake Disk

[BRAKEDISC_FX]
ACTIVE = 1             ; set to 0 to disable the whole thing if car uses ksBrakeDisc shader for something else
CERAMIC = 0            ; use ceramic look
CARVED = 0             ; add a bit of carving, radial lines (fast for shader to compute)
CARVED_FREQUENCY = 20  ; increase to make more lines
GLOW_OFFSET = 0.2      ; increase to offset heated and worn center more to the center, decrease to offset it more to the outside area; with 0.5, it would be in the middle

ALPHA_MASK = 0.1, 0.2  ; hole is everything with alpha below 0.1, everything with alpha above 0.2 is not a hole, in-between is a transition

DISC_RADIUS = 0.1           ; radius of a brake disc
DISC_INTERNAL_RADIUS = 0.05  ; radius of an inside part of a brake disc

RIM_RADIUS = 0.30  ; inside radius of a rim
RIM_HEIGHT = 0.4  ; distance between surface of brake disc and vertical surface of a wheel rim

[LIGHT_HEADLIGHT_0]
AFFECTS_TRACK=1
COLOR=15,20,25,0.5
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, -0.2, 1
EXTERIOR_ONLY=0
FADE_AT=450
FADE_SMOOTH=50
INTERIOR_ONLY=0
MIRROR=0.58
OFF_FADE_MULT=0.3
OFF_MIRROR=0.519496
OFF_MULT=0
OFF_POSITION=0, 0.403337, 1.80081
OFF_RANGE_MULT=0.0657895
POPUP_EDGE_EXP=0.3
POPUP_EDGE_OFFSET=0.5
POPUP_ENABLED=1
POPUP_END=0.7
POPUP_SECOND_SPOT_EXP=0.6
POPUP_SECOND_SPOT_INITIAL_VALUE=0.4
POPUP_START=0.05
POSITION=0, 0.47, 2.1
RANGE=456
RANGE_GRADIENT_OFFSET=0
SECOND_SPOT=137.16
SECOND_SPOT_INTENSITY=0.27
SECOND_SPOT_RANGE=20
SECOND_SPOT_SHARPNESS=0.643
SECOND_SPOT_SKIP=0.3
SPECULAR_MULT=1
SPOT=52.2
SPOT_EDGE=0.0806677, 0.0802867, 0.0795249
SPOT_EDGE_SHARPNESS=25.8726
SPOT_SHARPNESS=0
SPOT_UP=0.0237433, 0.999718, 0

[LIGHT_BRAKE_0]
AFFECTS_TRACK=1
COLOR=1, 0, 0, 2
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, 0, -1
EXTERIOR_ONLY=1
FADE_AT=120
FADE_SMOOTH=30
INTERIOR_ONLY=0
MIRROR=0.468203
OFF_COLOR=1, 0.0911936, 0.0265662, 1.35
OFF_FADE_MULT=0.674586
OFF_MIRROR=0.549986
OFF_MULT=0.1
OFF_POSITION=0, 0.54357, -1.98224
OFF_RANGE_MULT=0.767561
POSITION=0, 0.547034, -1.98224
RANGE=3
RANGE_GRADIENT_OFFSET=0.4
SPECULAR_MULT=1
SPOT=165.5
SPOT_EDGE=0.582, 0.582, 0.582
SPOT_EDGE_SHARPNESS=10
SPOT_SHARPNESS=0.3475

//////////// PBR EXTERIOR ///////////////////

;HEADLIGHT

[Material_InteriorPBRDetail]
Meshes= 78_0, Object, caliper_front1, 928_008, s15_tail_light_chrome 
ColorSource=LUMINANCE
OcclusionMult=0.8
Brightness=1.9
Metalness=0.6
Reflectance=0.8
Smoothness=1
CubemapReflectionBlur=0
UseDiffuseAlphaAsMask = 0

;TAILIGHT
[Material_InteriorPBRDetail]
Meshes= Object016, 1_001
ColorSource=LUMINANCE
OcclusionMult=1.8
Brightness=1.9
Metalness=0.6
Reflectance=0.8
Smoothness=1
CubemapReflectionBlur=0
UseDiffuseAlphaAsMask = 0

[Material_Plastic]
Meshes = s15_tail_light_black
Smoothness = 0.7
Reflectance = 0.1
Brightness=0.5

[Material_Plastic]
Meshes = 82_001
Smoothness = 0.9
Reflectance = 0.1
Brightness=0.02

;FOG LIGHT
[Material_InteriorPBRDetail]
Meshes= Object017
ColorSource=DIFUSSE
OcclusionMult=0.6
Brightness=2.9
Metalness=0.9
Reflectance=0.8
Smoothness=1
CubemapReflectionBlur=0
UseDiffuseAlphaAsMask = 0

;WHEEL

[Material_InteriorPBRDetail]
Materials= te37_rim
ColorSource=DIFFUSE
OcclusionMult=0.8
Brightness=0.4
Metalness=0.0
Reflectance=0.05
Smoothness=1
CubemapReflectionBlur=0.2
UseDiffuseAlphaAsMask = 1

;Plastic 1

[Material_Plastic]
Meshes = 75_0, s15_tail_light_cover, Object001 
Smoothness = 0.7
Reflectance = 0.05


[INCLUDE: materials_glass.ini]

;GLASS
[Material_PhotoelasticGlass]
SHADER = smGlass_phel
Meshes = 54_0
IOR = 2.5 
FilmIOR = 4.5              ; looks better like this
PhotoelasticityMult = 0.33  ; doesn’t look good if too high
ProfileFix = 0.02          ; a bit thicker edge

; Ideally, there would be a texture for that, but we’re not going to draw
; all those textures for Kunos cars, so here are some parameters for perlin noise
; instead
PhotoelasticityBaseScale = 12      ; this parameter alters scale in general
PhotoelasticityNoiseScale = 0.04  ; deeply affects randomization process, careful with it
PhotoelasticitySpotsScale = 0.5   ; spots for limiting effect to some areas
PhotoelasticitySpotsOffset = 0.1  ; offset for spots, to try and fit effect nice on existing meshes
PhotoelasticityStripesScale = 4   ; how many stripes are there

[Material_Glass]
; Main input parameters:
Meshes = 88_0, s15_tail_light_glass, s15_tail_light_turn_l, s15_tail_light_turn_r
IOR = 2.5            ; index of refraction for glass, usualy, 1.5
FilmIOR = $IOR       ; redefine IOR for external film layer to increase reflections
ThicknessMult = 0.4  ; thicker glass passes less light through
ProfileFix = 0.04    ; adds thickness to glass for glazing angles


[Material_Glass]
; Main input parameters:
Meshes = s15_tail_light_white
IOR = 5.5            ; index of refraction for glass, usualy, 1.5
FilmIOR = $IOR       ; redefine IOR for external film layer to increase reflections
ThicknessMult = 0.4  ; thicker glass passes less light through
ProfileFix = 0.04    ; adds thickness to glass for glazing angles





