[INCLUDE: common/navigators.ini]
[INCLUDE: navigators_mixins.ini]
[INCLUDE: common/selflighting.ini]
[INCLUDE: common/no_popup_lights.ini]
[INCLUDE: common/materials_glass.ini]
[INCLUDE: common/materials_interior.ini]
[INCLUDE: common/materials_carpaint.ini]
[INCLUDE: pbr_int.ini]
[INCLUDE: pbr.ini]
[INCLUDE: pbr_ext.ini]
[INCLUDE: android_auto/config.ini]
[INCLUDE: common/gt3_exhaust_glow.ini]
[INCLUDE: common/custom_emissive.ini]

[Material_CarPaint_Metallic]
CarPaintMaterial = paint_job_egcu 
FresnelMax = 1
FresnelC = 0.05
FlakesK = 0.3
BrightnessAdjustment = 0.4 ; compensates for ambient specular
ColoredSpecular = 0.9
AmbientSpecular = 0.7
AmbientSpecularEXP = 2.5
ClearCoatThickness = 0.36

[Material_CarPaint_Metallic]
CarPaintMaterial = rims_paint_job
FresnelMax = 1
FresnelC = 0.05
FlakesK = 0.1
BrightnessAdjustment = 0.9 ; compensates for ambient specular
ColoredSpecular = 0.9
AmbientSpecular = 0.7
AmbientSpecularEXP = 2.5
ClearCoatThickness = 0.36

[Material_InteriorPBRDetail]
Materials = piano_black
Reflectance = 0.72
Smoothness = 1
DetailNormalBlend =0
DetailScale =0
BrightnessAdjustment = 0
UseClearCoat = 1             ; set to 1 to add clear coat to material
ClearCoatSmoothness = 1    ; smoothness of clear coat
ClearCoatIntensity = 6     ; multiplier for clear coat, with 0, it’s pretty much disabled
ClearCoatNormalsShare = 0.0  ; how much of “txNormalDetail” goes to clear coat
ClearCoatF0 = 0.01          ; F0 for clear coat, should be 0.04 for most cases

[EXTRA_FX] ; Front + Taillights Glass Only
MASK_GBUFFER = material:glass_lenses, peugeot_508_egcu_spec.1185, peugeot_508_egcu_spec.1191, peugeot_508_egcu_spec.1189, peugeot_508_egcu_spec.1222, peugeot_508_egcu_spec.1022
SKIP_GBUFFER = material:glass_lenses, peugeot_508_egcu_spec.1185, peugeot_508_egcu_spec.1191, peugeot_508_egcu_spec.1189, peugeot_508_egcu_spec.1222, peugeot_508_egcu_spec.1022

[Material_CarPaint_Chrome]
Materials = chrome_lenses
NormalsMode = BASIC
BrightnessAdjustment = 0.2
SpecularBase = 1,30
SpecularSun = 12,1500
PROP_0 = isAdditive, 2
ClearCoatThickness = 0.2

[SHADER_REPLACEMENT_...]
MATERIALS = glass_lenses
PROP_0_... = ksAlphaRef, 1

[Material_Glass]
Materials = glass_lenses
IOR = 1.4         ; looks better like this
FilmIOR = 1.4     ; redefine IOR for external film layer to increase reflections
ThicknessMult = 15 ; thicker glass passes less light through
BrightnessAdjustment = 0
ExtraLightsAdjustment = 0

[Material_Chrome]
Materials=satin_headlights_1
Smoothness = 0.6
Metalness = 0.41
Reflectance = .8
OcclusionMap = 0.25
BrightnessAdjustment = 0.17
CubemapReflectionBlur = 0.5

[Material_Chrome]
Materials=chrome_headlights_1
Smoothness = 0.7
Metalness = 0.41
Reflectance = .9
OcclusionMap = 0.25
BrightnessAdjustment = 0.17
CubemapReflectionBlur = 0.5

[Material_Plastic_v2]
Materials=matte_plastic_1
Brightness=0.5
OcclusionMap = 0.5
Smoothness = 0.5
Reflectance = 0.05
DetailScale=15
ApplyTilingFix=0
DetailNormalIntensity=5

[SHADER_REPLACEMENT_...] ; Carbon1
MATERIALS = exterior_carbon_fiber
PROP_... = ksAmbient, 0.15
PROP_... = ksDiffuse, 0.15
PROP_... = ksSpecular, 1
PROP_... = ksSpecularEXP, 100
PROP_... = fresnelMaxLevel, 0.04
PROP_... = fresnelEXP, 1.5
PROP_... = fresnelC, 0.9
PROP_... = useDetail, 1
PROP_... = detailUVMultiplier, 250
PROP_... = detailNormalBlend, 1
DOUBLE_FACE_SHADOW_BIASED = 1

[SHADER_REPLACEMENT_...] ; Carbon2
MATERIALS = interior_carbon_fiber
PROP_... = ksAmbient, 0.15
PROP_... = ksDiffuse, 0.15
PROP_... = ksSpecular, 1
PROP_... = ksSpecularEXP, 100
PROP_... = fresnelMaxLevel, 0.04
PROP_... = fresnelEXP, 1.5
PROP_... = fresnelC, 0.9
PROP_... = useDetail, 1
PROP_... = detailUVMultiplier, 250
PROP_... = detailNormalBlend, 1
DOUBLE_FACE_SHADOW_BIASED = 1

[Material_Glass]
Materials = tailights_red_glass_1, tailights_Red_glass_2
FilmIOR = 2
ExtraLightsAdjustment = 0.0
Refraction = 1
Desaturate = 0.6
ThicknessMult = 0.4
EXTRA_MASK_PASS = 6
EXTRA_MASK_PASS_OPACITY = 6

[Material_Glass]
Materials = front_tinted_glass
MaskPass = 10     ; mask pass opacity
MaskPassColor = 0.0, 1.7, 0.8
IOR = 1.5          ; looks better like this
FilmIOR = 1.7      ; redefine IOR for external film layer to increaase reflections
ThicknessMult = 3 ; thicker glass passes less light through
BrightnessAdjustment = 0
ExtraLightsAdjustment = 0
usenormalmap = 1

[Material_Glass]
Materials = rear_tinted_glass
ThicknessMult = 40 
EXTRA_MASK_PASS = 1.5
EXTRA_MASK_PASS_OPACITY = 0
FilmIOR= 2

[Material_Glass]
Materials = tinted_glass
ThicknessMult = 40 
EXTRA_MASK_PASS = 1.5
EXTRA_MASK_PASS_OPACITY = 0
FilmIOR= 2

[Material_Leather] L1
Materials=interior_leather_1
OcclusionMap=0.7
DetailScale=40
Reflectance = 0.1
Smoothness = 0.4
Brightness=0.35
ApplyTilingFix=0
DetailNormalIntensity=1
DetailNormalBlend=2

[Material_Leather] L1
Materials=interior_leather_2
OcclusionMap=0.7
DetailScale=40
Reflectance = 0.1
Smoothness = 0.4
Brightness=0.15
ApplyTilingFix=0
DetailNormalIntensity=1
DetailNormalBlend=2

[Material_Leather] L1
Materials=interior_dotted_leather
OcclusionMap=0.7
DetailScale=40
Reflectance = 0.1
Smoothness = 0.4
Brightness=0.15
ApplyTilingFix=0
DetailNormalIntensity=1
DetailNormalBlend=2

[Material_Leather] roof
Materials=carpet_base
OcclusionMap=0.9
DetailScale=25
Reflectance = 0.01
Smoothness = 0.1
Brightness= 0.6
ApplyTilingFix=1
DetailNormalIntensity=2
DetailNormalBlend=0.3

[Material_Plastic_v2]
Materials=rough_plastic_1
Brightness=0.4
OcclusionMap = 0.3
Smoothness = 0.5
Reflectance = 0.05
DetailScale=15
ApplyTilingFix=0
DetailNormalIntensity=5

[Material_Plastic_v2]
Materials=rubber_seals
Brightness=0.4
OcclusionMap = 0.7
Smoothness = 0.1
Reflectance = 0.05
DetailScale=15
ApplyTilingFix=0
DetailNormalIntensity=5

[Material_Plastic_v2]
Materials=interior_aluminium_1
Brightness=0.9
OcclusionMap = 0.9
Smoothness = 0.9
Reflectance = 0.73
DetailScale=500
ApplyTilingFix=1
DetailNormalIntensity=1

[EMISSIVE_BRAKE_...] ; Emergency Flash
NAME=peugeot_508_egcu_spec.1217, peugeot_508_egcu_spec.1216
COLOR=20,0,0, 4
CAST_LIGHT=0
ACT_AS_HEADLIGHTS=0
FALLBACK_BRAKES_COLOR=20,0,0, 2
LAG=0
INPUT_THRESHOLD = 0.95
BLINK_REPEAT = 1 ; just make it blink
BLINK_FREQENCY_HZ = 4 ; sets frequency for blinking

[EMISSIVE_LIGHT_...]
NAME= peugeot_508_egcu_spec.1204, peugeot_508_egcu_spec.1205, peugeot_508_egcu_spec.1206, peugeot_508_egcu_spec.1207, peugeot_508_egcu_spec.1212, peugeot_508_egcu_spec.1213, peugeot_508_egcu_spec.1214, peugeot_508_egcu_spec.1215, peugeot_508_egcu_spec.1208, peugeot_508_egcu_spec.1209, peugeot_508_egcu_spec.1210, peugeot_508_egcu_spec.1211, peugeot_508_egcu_spec.1199, peugeot_508_egcu_spec.1198, peugeot_508_egcu_spec.1197, peugeot_508_egcu_spec.1196, peugeot_508_egcu_spec.1203, peugeot_508_egcu_spec.1202, peugeot_508_egcu_spec.1201, peugeot_508_egcu_spec.1200, peugeot_508_egcu_spec.1195, peugeot_508_egcu_spec.1194, peugeot_508_egcu_spec.1193, peugeot_508_egcu_spec.1192
COLOR=5,0,0,15
CAST_LIGHT=1
ACT_AS_HEADLIGHTS=0

[EXTRA_FX_EMISSIVE_...]
MESHES =peugeot_508_egcu_spec.1204, peugeot_508_egcu_spec.1205, peugeot_508_egcu_spec.1206, peugeot_508_egcu_spec.1207, peugeot_508_egcu_spec.1212, peugeot_508_egcu_spec.1213, peugeot_508_egcu_spec.1214, peugeot_508_egcu_spec.1215, peugeot_508_egcu_spec.1208, peugeot_508_egcu_spec.1209, peugeot_508_egcu_spec.1210, peugeot_508_egcu_spec.1211, peugeot_508_egcu_spec.1199, peugeot_508_egcu_spec.1198, peugeot_508_egcu_spec.1197, peugeot_508_egcu_spec.1196, peugeot_508_egcu_spec.1203, peugeot_508_egcu_spec.1202, peugeot_508_egcu_spec.1201, peugeot_508_egcu_spec.1200, peugeot_508_egcu_spec.1195, peugeot_508_egcu_spec.1194, peugeot_508_egcu_spec.1193, peugeot_508_egcu_spec.1192, peugeot_508_egcu_spec.1217, peugeot_508_egcu_spec.1216  ; list of meshes
RANGE = .057           ; range in meters (by default 0.08 for cars and 5 for tracks)
COLOR = 1.5           ; optional brightness multiplier (could be an RGBA value)
DIRECTED =1        ; set for 0 for point light and 1 for directed light, or to
DISABLE_WITH_EMISSIVE_LIGHT = 1
INTERIOR_ONLY = 0        ; show up for interior views only
EXTERIOR_ONLY = 0        ; show up for exterior views onlys

EMISSIVE_TWEAK = 1       ; extra tonemapping for emissive color to balance things out
    ; (set to 0 to disable, set above 1 to further reduce effect or large emissive value)
MIP_BIAS = 0             ; MIP bias for texture (increase for smoother light)
IGNORE_TEXTURE_COLOR = 0 ; set to 1 to use COLOR and emissive color only
; Optional distribution settings (can affect performance):
COVERAGE = 12             ; samples density, by default 3 for cars and 2 for tracks (actual
    ; number of samples is controlled by mesh area, light range and coverage)
SAMPLES_LIMIT = 1200      ; upper limit for number of samples to make sure generation won’t
    ; take huge amount of time, by default 400 for tracks
SPLIT_ELEMENTS = 1       ; split meshes into elements before generating samples, 
    ; by default 1 for tracks
SPLIT_THRESHOLD = ...      ; set to something above 0 to weld vertices within that distance
    ; before splitting elements
NORMAL_SHIFT = 0         ; increase to move light producing samples away from surface alogn
    ; normals (use it if surroundings are too dark)
COVERED_BY = …           ; stop emissive if a mesh with given name is visible

[EMISSIVE_TURNSIGNAL_LEFT_...]
NAME=peugeot_508_egcu_spec.333
COLOR=20, 10, 0, 10
FALLBACK_HEADLIGHTS_COLOR=5,6,8, 2.3
LAG=0.5
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_...]
NAME=peugeot_508_egcu_spec.1020
COLOR=20, 10, 0, 10
FALLBACK_HEADLIGHTS_COLOR=7,6,8, 2.3
LAG=0.5
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_LIGHT_...]
NAME= peugeot_508_egcu_spec.339
COLOR=1,1,1,5
CAST_LIGHT=1
ACT_AS_HEADLIGHTS=0

[EXTRA_FX_EMISSIVE_...]
MESHES =peugeot_508_egcu_spec.339  ; list of meshes
RANGE = .027           ; range in meters (by default 0.08 for cars and 5 for tracks)
COLOR =2           ; optional brightness multiplier (could be an RGBA value)
DIRECTED =1        ; set for 0 for point light and 1 for directed light, or to
DISABLE_WITH_EMISSIVE_LIGHT = 1
INTERIOR_ONLY = 0        ; show up for interior views only
EXTERIOR_ONLY = 0        ; show up for exterior views onlys

EMISSIVE_TWEAK = 1       ; extra tonemapping for emissive color to balance things out
    ; (set to 0 to disable, set above 1 to further reduce effect or large emissive value)
MIP_BIAS = 0             ; MIP bias for texture (increase for smoother light)
IGNORE_TEXTURE_COLOR = 0 ; set to 1 to use COLOR and emissive color only
; Optional distribution settings (can affect performance):
COVERAGE = 12             ; samples density, by default 3 for cars and 2 for tracks (actual
    ; number of samples is controlled by mesh area, light range and coverage)
SAMPLES_LIMIT = 1200      ; upper limit for number of samples to make sure generation won’t
    ; take huge amount of time, by default 400 for tracks
SPLIT_ELEMENTS = 1       ; split meshes into elements before generating samples, 
    ; by default 1 for tracks
SPLIT_THRESHOLD = ...      ; set to something above 0 to weld vertices within that distance
    ; before splitting elements
NORMAL_SHIFT = 0         ; increase to move light producing samples away from surface alogn
    ; normals (use it if surroundings are too dark)
COVERED_BY = …           ; stop emissive if a mesh with given name is visible

[EXTRA_FX_EMISSIVE_...]
MESHES =peugeot_508_egcu_spec.1020  ; list of meshes
RANGE = .027           ; range in meters (by default 0.08 for cars and 5 for tracks)
COLOR = 0.6           ; optional brightness multiplier (could be an RGBA value)
DIRECTED =0        ; set for 0 for point light and 1 for directed light, or to
DISABLE_WITH_EMISSIVE_LIGHT = 1
INTERIOR_ONLY = 0        ; show up for interior views only
EXTERIOR_ONLY = 0        ; show up for exterior views onlys

EMISSIVE_TWEAK = 1       ; extra tonemapping for emissive color to balance things out
    ; (set to 0 to disable, set above 1 to further reduce effect or large emissive value)
MIP_BIAS = 0             ; MIP bias for texture (increase for smoother light)
IGNORE_TEXTURE_COLOR = 0 ; set to 1 to use COLOR and emissive color only
; Optional distribution settings (can affect performance):
COVERAGE = 12             ; samples density, by default 3 for cars and 2 for tracks (actual
    ; number of samples is controlled by mesh area, light range and coverage)
SAMPLES_LIMIT = 1200      ; upper limit for number of samples to make sure generation won’t
    ; take huge amount of time, by default 400 for tracks
SPLIT_ELEMENTS = 1       ; split meshes into elements before generating samples, 
    ; by default 1 for tracks
SPLIT_THRESHOLD = ...      ; set to something above 0 to weld vertices within that distance
    ; before splitting elements
NORMAL_SHIFT = 0         ; increase to move light producing samples away from surface alogn
    ; normals (use it if surroundings are too dark)
COVERED_BY = …           ; stop emissive if a mesh with given name is visible

[EMISSIVE_LIGHT_...]
NAME= peugeot_508_egcu_spec.1179, peugeot_508_egcu_spec.1088, peugeot_508_egcu_spec.1090, peugeot_508_egcu_spec.1087, peugeot_508_egcu_spec.1086, peugeot_508_egcu_spec.1108, peugeot_508_egcu_spec.1127
COLOR=5,8,10,1
CAST_LIGHT=1
ACT_AS_HEADLIGHTS=0

[EMISSIVE_LIGHT_...]
NAME= peugeot_508_egcu_spec.1081, peugeot_508_egcu_spec.1102, peugeot_508_egcu_spec.1121, peugeot_508_egcu_spec.1009, peugeot_508_egcu_spec.1142
COLOR=5,0,2,0.3
CAST_LIGHT=1
ACT_AS_HEADLIGHTS=0

[EXTRA_FX_EMISSIVE_...]
MESHES =peugeot_508_egcu_spec.1081, peugeot_508_egcu_spec.1102, peugeot_508_egcu_spec.1121, peugeot_508_egcu_spec.1009, peugeot_508_egcu_spec.1142  ; list of meshes
RANGE = .027           ; range in meters (by default 0.08 for cars and 5 for tracks)
COLOR = 0.3           ; optional brightness multiplier (could be an RGBA value)
DIRECTED =0        ; set for 0 for point light and 1 for directed light, or to
DISABLE_WITH_EMISSIVE_LIGHT = 1
INTERIOR_ONLY = 0        ; show up for interior views only
EXTERIOR_ONLY = 0        ; show up for exterior views onlys

EMISSIVE_TWEAK = 1       ; extra tonemapping for emissive color to balance things out
    ; (set to 0 to disable, set above 1 to further reduce effect or large emissive value)
MIP_BIAS = 0             ; MIP bias for texture (increase for smoother light)
IGNORE_TEXTURE_COLOR = 0 ; set to 1 to use COLOR and emissive color only
; Optional distribution settings (can affect performance):
COVERAGE = 20             ; samples density, by default 3 for cars and 2 for tracks (actual
    ; number of samples is controlled by mesh area, light range and coverage)
SAMPLES_LIMIT = 2000      ; upper limit for number of samples to make sure generation won’t
    ; take huge amount of time, by default 400 for tracks
SPLIT_ELEMENTS = 1       ; split meshes into elements before generating samples, 
    ; by default 1 for tracks
SPLIT_THRESHOLD = ...      ; set to something above 0 to weld vertices within that distance
    ; before splitting elements
NORMAL_SHIFT = 0         ; increase to move light producing samples away from surface alogn
    ; normals (use it if surroundings are too dark)
COVERED_BY = …           ; stop emissive if a mesh with given name is visible

[LIGHT_EXTRA_...]
BIND_TO_HEADLIGHTS = 1
AMBIENT_INFLUENCE = 0
COLOR=8,8,8,1
DIFFUSE_CONCENTRATION = 0
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
AFFECTS_TRACK=0
SIMULATE_HEATING= 0.2
LAG=0.19
FADE_AT=200
FADE_SMOOTH=50
MIRROR=0.0, 0, 0
POSITION=0.682, 0.62, 2.01
DIRECTION=0.2, 0, -1
RANGE=0.065
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=2

[LIGHT_EXTRA_...]
BIND_TO_HEADLIGHTS = 1
AMBIENT_INFLUENCE = 0
COLOR=8,8,8,1
DIFFUSE_CONCENTRATION = 0
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
AFFECTS_TRACK=0
SIMULATE_HEATING= 0.2
LAG=0.19
FADE_AT=200
FADE_SMOOTH=50
MIRROR=0.0, 0, 0
POSITION=-0.682, 0.62, 2.01
DIRECTION=0.2, 0, -1
RANGE=0.065
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=2

[LIGHT_EXTRA_...]
BIND_TO_HIGHBEAM = 1
AMBIENT_INFLUENCE = 0
COLOR=8,8,8,10
DIFFUSE_CONCENTRATION = 0
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
AFFECTS_TRACK=0
SIMULATE_HEATING= 0.2
LAG=0.19
FADE_AT=200
FADE_SMOOTH=50
MIRROR=0.0, 0, 0
POSITION=0.553, 0.592, 2.1
DIRECTION=0.2, 0, -1
RANGE=0.045
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=6

[LIGHT_EXTRA_...]
BIND_TO_HIGHBEAM = 1
AMBIENT_INFLUENCE = 0
COLOR=8,8,8,10
DIFFUSE_CONCENTRATION = 0
EXTERIOR_ONLY=0
INTERIOR_ONLY=0
AFFECTS_TRACK=0
SIMULATE_HEATING= 0.2
LAG=0.19
FADE_AT=200
FADE_SMOOTH=50
MIRROR=0.0, 0, 0
POSITION=-0.553, 0.592, 2.1
DIRECTION=0.2, 0, -1
RANGE=0.045
RANGE_GRADIENT_OFFSET=0.3
SPECULAR_MULT=6

[LIGHT_LICENSEPLATE]
; no need to specify meshes names if material is using
; Plate_D.dds and Plate_NM.dds textures
MESHES=peugeot_508_egcu_spec.1150
OFFSET=0.03, 0.03, -0.0
RANGE=0.30
RANGE_GRADIENT_OFFSET=0.3
SPOT=140
SPOT_SHARPNESS=0.6
COLOR=10,12,13,1
; other supported values: TWO_ON_TOP, ONE_ON_TOP
LAYOUT=TWO_ON_TOP
RELATIVE_TO=BOOT

[Material_Chrome]
Materials=chrome_1
Smoothness = .8
Metalness = 1
Reflectance = .5
DetailNormalPBRSecondaryColor = 1.1, 0.6, 0, 0.05
BrightnessAdjustment = 0.8
CubemapReflectionBlur = 0.5

[Material_Chrome]
Materials=exterior_gold_1
Smoothness = 0.9
Metalness = 0.9
Reflectance = .6
DetailNormalPBRSecondaryColor = 1.1, 0.6, 0, 0.25
BrightnessAdjustment = 0.3
CubemapReflectionBlur = 0.5

[SHADER_REPLACEMENT_...]		; ADD BACKSIDE TO MESH THAT IS TRANSPARENT FROM BEHIND
MATERIALS=rubber_seals, piano_black
CULL_MODE=DOUBLESIDED	

[SCRIPTABLE_DISPLAY_...]
MESHES = peugeot_508_egcu_spec.339
RESOLUTION = 1385, 795 ; matches values in navigator
DISPLAY_POS = 0, 0
DISPLAY_SIZE = 1270, 800
KEEP_BACKGROUND = 0 ; Stop CSP from painting original texture as background to get stereo and navigator 
  ; to work. Script will need to reset background manually or things will leave trails.
INTERACTIVE = 1 ; Keep track of mouse position over the display (adds extra cost, especially on high poly meshes)
FORCE_UPDATE_AFTER = NAVIGATOR_0
aftermarketComponent=1
SCRIPT = roma.lua
RearCameraPosition = 0.104, 1.01, -1.45

[RENDERING_CAMERA_0]
DYNAMIC_TEXTURE_ID = camera_rear ; here, we will create “dynamic::camera_rear” texture
POSITION = 0, 0.685, -2.65
DIRECTION = 0, -0.5, -1
INCLUDE_CAR = 1
REFRESH_RATE = 20  ; doesn’t need to update too often, those in-car cameras are usually pretty nasty
INTERIOR_ONLY = 1  ; stop rendering if camera is not interior one
CLIP_NEAR = 0.005  ; the way it’s positioned, it needs to render things that are very close (bits of car)
FOV = 168          ; huge FOV to get that authentic look
RESOLUTION = 3200, 2000 ; and massive resolution too
ACTIVE_BY_DEFAULT = 1 ; inactive by default, activated by a script
WITH_LIGHTING = 1
; RELATIVE_TO = DOOR_L

[RENDERING_CAMERA_1]
DYNAMIC_TEXTURE_ID = camera_360 ; here, we will create “dynamic::camera_rear” texture
POSITION = 0, 8.6, .3
DIRECTION = 0, -1, 0
INCLUDE_CAR = 1
REFRESH_RATE = 20  ; doesn’t need to update too often, those in-car cameras are usually pretty nasty
INTERIOR_ONLY = 1  ; stop rendering if camera is not interior one
CLIP_NEAR = 0.005  ; the way it’s positioned, it needs to render things that are very close (bits of car)
FOV = 60        ; huge FOV to get that authentic look5
RESOLUTION = 1500, 2000 ; and massive resolution too
ACTIVE_BY_DEFAULT = 0 ; inactive by default, activated by a script
WITH_LIGHTING = 1
; RELATIVE_TO = DOOR_L

[TEXTURE_PREPROCESSING_...]
DYNAMIC_TEXTURE_ID = camera_rear_distorted ; new “dynamic::camera_rear_distorted” texture
TEXTURE_SOURCE = dynamic::camera_rear ; use previously specificed camera texture
RESOLUTION = 900, 500 ; target resolution matches screen one, RESOLUTION for camera is just that multiplied by four
EFFECT = FISHEYE  ; use BASIC if you only need color correction (SATURATION, BRIGHTNESS, etc.)
INTENSITY = 1.7   ; intensity of fisheye effect, adjusted for 170° FOV
EXPOSURE = .6      ; this value activates tonemapping to get image from HDR to LDR space
BRIGHTNESS = 0.7  ; a bit dimmer

[TEXTURE_PREPROCESSING_...]
DYNAMIC_TEXTURE_ID = camera_360_distorted ; new “dynamic::camera_rear_distorted” texture
TEXTURE_SOURCE = dynamic::camera_360 ; use previously specificed camera texture
RESOLUTION = 250., 500 ; target resolution matches screen one, RESOLUTION for camera is just that multiplied by four
EFFECT = FISHEYE  ; use BASIC if you only need color correction (SATURATION, BRIGHTNESS, etc.)
INTENSITY = 0.4   ; intensity of fisheye effect, adjusted for 170° FOV
EXPOSURE = .4      ; this value activates tonemapping to get image from HDR to LDR space
BRIGHTNESS = 0.7  ; a bit dimmer

[EXHAUST_FLAMES] ; CSP Flames Configuration
ANTILAG=0 ; turbo antilag, i havent tested this yet
ANTILAG_DELAY=0.0 ; how long after antilag trigger do flames start, in seconds
ANTILAG_INTENSITY=10 ; flame size
ANTILAG_INTERVAL_MAX=7000
ANTILAG_INTERVAL_MIN=65000
ANTILAG_TURBO_THRESHOLD=0.0
DAMAGE=0 ; engine damage? idk
DAMAGE_DURATION=0.00
DAMAGE_INTENSITY=0
DAMAGE_PROBABILITY=0
DISCHARGE=1 ; lifting off the throttle
DISCHARGE_CHARGE_TIME=0.1 ; how long you have to press the throttle to "charge" the flames
DISCHARGE_DELAY=0.1 ; delay after throttle lift
DISCHARGE_DURATION=0.95 ; length of flame shooting, in seconds
DISCHARGE_PROBABILITY=1; chance of flame shoot on lift, 1 is guaranteed, 0 is never
DISCHARGE_INTENSITY=1; flame size
DISCHARGE_RPM_THRESHOLD_MAX=7200 ; self explanatory
DISCHARGE_RPM_THRESHOLD_MIN=2000 ; self explanatory
DISCHARGE_WATER_TEMPERATURE_THRESHOLD=70
FLAT_SHIFT=1 ; on upshift
FLAT_SHIFT_COOLDOWN=0 ; after upshift
FLAT_SHIFT_DURATION=0.1 ; length of flame shooting, in seconds
FLAT_SHIFT_GAS_THRESHOLD=50 ; how much gas needs to be pressed on upshift for flame, 100 is wide open
FLAT_SHIFT_INTENSITY=.1 ; flame size
FLAT_SHIFT_PROBABILITY=.5 ; chance of flame shoot on upshift
FLAT_SHIFT_RPM_THRESHOLD=6900
LIMITER=1 ; on hitting the limiter
LIMITER_DELAY=0.2 ; delay, in seconds
LIMITER_INTENSITY=.1 ; flame size
LIMITER_RPM_THRESHOLD=7300 ; limiter flames will not shoot below this rpm

[EMISSIVE_TURNSIGNAL_LEFT_...]
NAME=peugeot_508_egcu_spec.1220
COLOR=20, 40, 0, 20
LAG=0.5
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EMISSIVE_TURNSIGNAL_RIGHT_...]
NAME=peugeot_508_egcu_spec.1221
COLOR=20, 40, 0, 20
LAG=0.5
SIMULATE_HEATING=0.0
LOCATION=FRONT

[EXTRA_FX_EMISSIVE_...]
MESHES = peugeot_508_egcu_spec.1220, peugeot_508_egcu_spec.1221 ; list of meshes
RANGE = .037           ; range in meters (by default 0.08 for cars and 5 for tracks)
COLOR = 0.3           ; optional brightness multiplier (could be an RGBA value)
DIRECTED =0        ; set for 0 for point light and 1 for directed light, or to
DISABLE_WITH_EMISSIVE_LIGHT = 1
INTERIOR_ONLY = 0        ; show up for interior views only
EXTERIOR_ONLY = 0        ; show up for exterior views onlys

EMISSIVE_TWEAK = 1       ; extra tonemapping for emissive color to balance things out
    ; (set to 0 to disable, set above 1 to further reduce effect or large emissive value)
MIP_BIAS = 0             ; MIP bias for texture (increase for smoother light)
IGNORE_TEXTURE_COLOR = 0 ; set to 1 to use COLOR and emissive color only
; Optional distribution settings (can affect performance):
COVERAGE = 20             ; samples density, by default 3 for cars and 2 for tracks (actual
    ; number of samples is controlled by mesh area, light range and coverage)
SAMPLES_LIMIT = 2000      ; upper limit for number of samples to make sure generation won’t
    ; take huge amount of time, by default 400 for tracks
SPLIT_ELEMENTS = 1       ; split meshes into elements before generating samples, 
    ; by default 1 for tracks
SPLIT_THRESHOLD = ...      ; set to something above 0 to weld vertices within that distance
    ; before splitting elements
NORMAL_SHIFT = 0         ; increase to move light producing samples away from surface alogn
    ; normals (use it if surroundings are too dark)
COVERED_BY = …           ; stop emissive if a mesh with given name is visible

[EMISSIVE_LIGHT_...]
NAME= peugeot_508_egcu_spec.338
COLOR=2,2,2, 0.4
CAST_LIGHT=1
ACT_AS_HEADLIGHTS=0

[EMISSIVE_LIGHT_...]
NAME= Plane.001, Plane
COLOR=2,2,2, 10
CAST_LIGHT=1
ACT_AS_HEADLIGHTS=0

[EXTRA_FX_EMISSIVE_...]
MESHES = peugeot_508_egcu_spec.338 ; list of meshes
RANGE = .037           ; range in meters (by default 0.08 for cars and 5 for tracks)
COLOR = 3           ; optional brightness multiplier (could be an RGBA value)
DIRECTED =1        ; set for 0 for point light and 1 for directed light, or to
DISABLE_WITH_EMISSIVE_LIGHT = 1
INTERIOR_ONLY = 0        ; show up for interior views only
EXTERIOR_ONLY = 0        ; show up for exterior views onlys

EMISSIVE_TWEAK = 1       ; extra tonemapping for emissive color to balance things out
    ; (set to 0 to disable, set above 1 to further reduce effect or large emissive value)
MIP_BIAS = 0             ; MIP bias for texture (increase for smoother light)
IGNORE_TEXTURE_COLOR = 0 ; set to 1 to use COLOR and emissive color only
; Optional distribution settings (can affect performance):
COVERAGE = 20             ; samples density, by default 3 for cars and 2 for tracks (actual
    ; number of samples is controlled by mesh area, light range and coverage)
SAMPLES_LIMIT = 2000      ; upper limit for number of samples to make sure generation won’t
    ; take huge amount of time, by default 400 for tracks
SPLIT_ELEMENTS = 1       ; split meshes into elements before generating samples, 
    ; by default 1 for tracks
SPLIT_THRESHOLD = ...      ; set to something above 0 to weld vertices within that distance
    ; before splitting elements
NORMAL_SHIFT = 0         ; increase to move light producing samples away from surface alogn
    ; normals (use it if surroundings are too dark)
COVERED_BY = …           ; stop emissive if a mesh with given name is visible

[DI_DRIVEN_TOTAL_...]
DIGITAL_ITEM = 2
DIGITAL_ITEM_NUMBER_FORMAT = 1.0

[DI_SPEED_...]
DIGITAL_ITEM = 1
DIGITAL_ITEM_NUMBER_FORMAT = 1.0

[DI_WATER_TEMPERATURE_...]
DIGITAL_ITEM = 6
DIGITAL_ITEM_NUMBER_FORMAT = 1.0

[DI_OIL_TEMPERATURE_...]
DIGITAL_ITEM = 5
DIGITAL_ITEM_NUMBER_FORMAT = 1.0

[DI_FUEL_ESTIMATE_DISTANCE_...]
DIGITAL_ITEM = 3
DIGITAL_ITEM_NUMBER_FORMAT = 1.0

[DI_GEAR_...]
DIGITAL_ITEM = 0
DIGITAL_ITEM_NUMBER_FORMAT = 1.0

[EMISSIVE_TURNSIGNAL_LEFT_...]
NAME=Plane.002
COLOR=0,5,0,5
LAG=0.7 
SIMULATE_HEATING=0 
LOCATION=SIDE
TOGGLE_VISIBILITY = 1

[EMISSIVE_TURNSIGNAL_RIGHT_...]
NAME=Plane.003
COLOR=0,5,0,5
LAG=0.7 
SIMULATE_HEATING=0 
LOCATION=SIDE
TOGGLE_VISIBILITY = 1

[EMISSIVE_HANDBRAKE_0]
NAME=Plane.007
COLOR=40,0,0,2
BLINK_FREQENCY_HZ=1
LAG=0.0
TOGGLE_VISIBILITY = 1

[EMISSIVE_LIGHT_...]
NAME=Plane.005
BLINK_REPEAT = 1                ; just make it blink
BLINK_FREQENCY_HZ = 1         ; sets frequency for blinking
COLOR=8,0,0,3
FALLBACK_HEADLIGHTS_COLOR =0,0,0
CAST_LIGHT=1
ACT_AS_HEADLIGHTS=0
TOGGLE_VISIBILITY = 1

[EMISSIVE_TRACTIONCONTROL_INACTION_0]
COLOR=40,15,0,5
NAME=Plane.009
LAG=0.0
TOGGLE_VISIBILITY = 1

[EMISSIVE_...]
NAME=Plane.010
TOGGLE_VISIBILITY = 1
COLOR=40,7,0,1
INPUT=FUEL
INPUT_THRESHOLD = 12
INPUT_THRESHOLD_INVERSE = 1
LAG=0.4

[EMISSIVE_ABS_INACTION_0]
COLOR=40,15,0,1
NAME=Plane.008
TOGGLE_VISIBILITY = 1
LAG=0.0

[EMISSIVE_LIGHT_...]
NAME= Plane.004
COLOR=2,2,2, 10
CAST_LIGHT=1
ACT_AS_HEADLIGHTS=0

[EMISSIVE_HIGHBEAM_...]	highbeams		; MAKE A MESH INTO A HIGHBEAM LIGHT
BIND_TO_HEADLIGHTS=0			; bind to headlights button if needed
NAME= Plane.011				; name of meshes to activate (object1, object2, object3, etc.)
COLOR=0,0,5,10			; colour of mesh when active
LAG=0.				; lag time after activating
SIMULATE_HEATING=0.5			; add extra glow to mesh
LOCATION=FRONT				; position of light - front / rear / none
CAST_LIGHT=1				; make mesh project light
CLUSTER_THRESHOLD=0.5

[EMISSIVE_BATTERY_0]
NAME=Plane.006
COLOR=30,0,0,1
TOGGLE_VISIBILITY = 1

[ANALOG_INDICATOR_...]
INPUT = RPM
INPUT_MAX = 7000
NAME = DI_1
DELAY = 0
ZERO = -50
STEP=-0.0308

[ANALOG_INDICATOR_...]
NAME=DI_2
INPUT = SPEED
ZERO=0
STEP=0.6337705

[EXTRA_FX_EMISSIVE_...]
MESHES = Plane.007, Plane.005, Plane.010, Plane.009, Plane.005, Plane.008, Plane.004, Plane.011, Plane.006, Plane.003, Plane.002 ; list of meshes
RANGE = .037           ; range in meters (by default 0.08 for cars and 5 for tracks)
COLOR = 1           ; optional brightness multiplier (could be an RGBA value)
DIRECTED =1        ; set for 0 for point light and 1 for directed light, or to
DISABLE_WITH_EMISSIVE_LIGHT = 1
INTERIOR_ONLY = 0        ; show up for interior views only
EXTERIOR_ONLY = 0        ; show up for exterior views onlys

EMISSIVE_TWEAK = 1       ; extra tonemapping for emissive color to balance things out
    ; (set to 0 to disable, set above 1 to further reduce effect or large emissive value)
MIP_BIAS = 0             ; MIP bias for texture (increase for smoother light)
IGNORE_TEXTURE_COLOR = 0 ; set to 1 to use COLOR and emissive color only
; Optional distribution settings (can affect performance):
COVERAGE = 20             ; samples density, by default 3 for cars and 2 for tracks (actual
    ; number of samples is controlled by mesh area, light range and coverage)
SAMPLES_LIMIT = 2000      ; upper limit for number of samples to make sure generation won’t
    ; take huge amount of time, by default 400 for tracks
SPLIT_ELEMENTS = 1       ; split meshes into elements before generating samples, 
    ; by default 1 for tracks
SPLIT_THRESHOLD = ...      ; set to something above 0 to weld vertices within that distance
    ; before splitting elements
NORMAL_SHIFT = 0         ; increase to move light producing samples away from surface alogn
    ; normals (use it if surroundings are too dark)
COVERED_BY = …           ; stop emissive if a mesh with given name is visible

[EMISSIVE_REVERSE_0]
NAME=peugeot_508_egcu_spec.1219, peugeot_508_egcu_spec.1218
COLOR=25, 25, 25,10
LAG=0.8
SIMULATE_HEATING=0.3

[EXTRA_FX_EMISSIVE_...]
MESHES = peugeot_508_egcu_spec.1219, peugeot_508_egcu_spec.1218 ; list of meshes
RANGE = .037           ; range in meters (by default 0.08 for cars and 5 for tracks)
COLOR = 1           ; optional brightness multiplier (could be an RGBA value)
DIRECTED =0        ; set for 0 for point light and 1 for directed light, or to
DISABLE_WITH_EMISSIVE_LIGHT = 1
INTERIOR_ONLY = 0        ; show up for interior views only
EXTERIOR_ONLY = 0        ; show up for exterior views onlys

EMISSIVE_TWEAK = 1       ; extra tonemapping for emissive color to balance things out
    ; (set to 0 to disable, set above 1 to further reduce effect or large emissive value)
MIP_BIAS = 0             ; MIP bias for texture (increase for smoother light)
IGNORE_TEXTURE_COLOR = 0 ; set to 1 to use COLOR and emissive color only
; Optional distribution settings (can affect performance):
COVERAGE = 20             ; samples density, by default 3 for cars and 2 for tracks (actual
    ; number of samples is controlled by mesh area, light range and coverage)
SAMPLES_LIMIT = 2000      ; upper limit for number of samples to make sure generation won’t
    ; take huge amount of time, by default 400 for tracks
SPLIT_ELEMENTS = 1       ; split meshes into elements before generating samples, 
    ; by default 1 for tracks
SPLIT_THRESHOLD = ...      ; set to something above 0 to weld vertices within that distance
    ; before splitting elements
NORMAL_SHIFT = 0         ; increase to move light producing samples away from surface alogn
    ; normals (use it if surroundings are too dark)
COVERED_BY = …           ; stop emissive if a mesh with given name is visible

[LIGHT_HEADLIGHT_0]
AFFECTS_TRACK=1
BOUND_EMISSIVE_MAX=500
BOUND_EXP=1
COLOR=28,35,50, 1
DIFFUSE_CONCENTRATION=0.88
DIRECTION=0, -0.2, 1
EXTERIOR_ONLY=0
FADE_AT=450
FADE_SMOOTH=50
INTERIOR_ONLY=0
LOWBEAM_RANGE_MAX=150
LOWBEAM_RANGE_MULT=0.38
LOWBEAM_RANGE_ONCOMING_MULT=038
MIRROR=0.682
MIRROR_DIRECTION=0
POPUP_ENABLED=0
POSITION=0, 0.62, 2.01
RANGE=200
RANGE_GRADIENT_OFFSET=0
SECOND_SPOT=129.6
SECOND_SPOT_INTENSITY=0.27
SECOND_SPOT_RANGE=20
SECOND_SPOT_SHARPNESS=0.58
SECOND_SPOT_SKIP=0.3
SINGLE_FREQUENCY=0
SPECULAR_MULT=1
SPOT=68
SPOT_EDGE=0.02088, 0.01992, 0.018
SPOT_EDGE_SHARPNESS=100
SPOT_SHARPNESS=0.8
SPOT_UP=0.0499376, 0.6998752, 0