[INCLUDE: common/selflighting.ini]
; ==========================================================
; 1. DIGITAL SPEEDOMETER SCREEN
; ==========================================================
[SCRIPTABLE_DISPLAY_1]
MESHES =MOCKUP_DISPLAY ; Replace with your screen's mesh name
RESOLUTION = 1024, 512   ; The pixel resolution of your digital dash
SCRIPT = dash.lua        ; The name of the script we are about to create

[INCLUDE: common/materials_carpaint.ini]
CarPaintVersionAware = 4

[Material_CarPaint_Metallic]
CarPaintMaterial = body_paint, body_2
ColorSource = DIFFUSE
ClearCoatThickness = 0.15
FresnelMax = 1.0
FresnelC = 0.1
SpecularBase = 0.2, 50
SpecularSun = 1.0, 1500
FlakesK = 0.7                  ; Tweak this per skin: 0.3 for subtle pearl, 1.0 for heavy metallic

[SHADER_REPLACEMENT_0_EXHAUST]
MESHES = EXT_MECH_EXHAUST
SHADER = ksPerPixelReflection
PROP_0 = ksAmbient, 0.15
PROP_1 = ksDiffuse, 0.15
PROP_2 = ksSpecular, 1.0
PROP_3 = ksSpecularEXP, 150       ; Slightly brushed metal look (use 500+ for pure chrome)
PROP_4 = fresnelMaxLevel, 1.0
PROP_5 = fresnelC, 0.5
PROP_6 = extColoredBaseReflection, 1 ; Forces PBR environment reflections

[INCLUDE: common/materials_glass.ini]

; --- HEADLIGHT GLASS ---
[Material_Glass]
Meshes = EXT_LIGHTS_GLASS
FilmIOR = 2.2                ; Gives that slight rainbow sheen seen on modern headlight polycarbonate
Refraction = 1
ThicknessMult = 1.5          ; Makes the glass look thick and solid over the bulbs
ExtraLightsAdjustment = 1    ; Makes self-lighting bounce inside the housing beautifully

; --- WINDOWS ---
[Material_Glass]
Meshes = EXT_WINDOWS001, EXT_WINDOWS
ThicknessMult = 1.0
Refraction = 1
Desaturate = 0
; Optional: Add a very slight factory green/grey tint to the windows
BaseColor = 0.1, 0.1, 0.12, 0.5

[INCLUDE: common/materials_interior.ini]

; Fixes shadow z-fighting/acne on thin meshes like stitches and transparent decals
[SHADER_REPLACEMENT_0_INTERIOR_FIXES]
MESHES = INT_STITCHES003, INT_DECALS005
DOUBLE_FACE_SHADOW_BIASED = 1

; --- SMOOTH LEATHER ---
[Material_Leather_v2]
Materials = leather_int_1, leather_int_2, steer_leather
Reflectance = 0.05
Roughness = 0.65
DetailScale = 50

; --- ALUMINUM ---
[Material_Aluminium_v2]
Meshes = INT_ELEC_ALU004, INT_STEER_METAL_BLACK_GLOSS001
Metalness = 0.9           ; Pure metal
Roughness = 0.35          ; Slightly brushed/anodized look (not a mirror)
DetailScale = 0

; --- CHROME ---
[Material_Metal_v2]
Meshes = INT_ELEC_METAL_BLACK_SATIN002, INT_ELEC_METAL_BLACK_SATIN001
Metalness = 1.0
Roughness = 0.05          ; Very smooth, mirror-like
ColorSource = CONSTANT
Color = 1, 1, 1           ; Pure silver reflection

; --- BLACK / DARK METAL ---
[Material_Metal_v2]
Meshes = INT_OCC_METAL_BLACK, INT_STEER_METAL, INT_STEER_METAL_BLACK001
Metalness = 0.8
Roughness = 0.5           ; Matte metal finish
ColorSource = CONSTANT
Color = 0.15, 0.15, 0.15  ; Darkens the metal

; --- CARBON FIBER ---
[Material_Carbon]
Meshes = INT_OCC_CARBON004, INT_STEER_CARBON001
ClearCoatF0 = 0.35        ; Strength of the clear coat reflection
DetailScale = 600         ; Adjust this if the carbon weave looks too large/small
UseClearCoat = 1          ; Gives it that epoxy resin shine

; --- PLASTIC ---
[Material_Plastic_v2]
Materials = plastic_int, int_plastic_black, steer_yellow
Brightness = 0.6
Roughness = 0.8
Reflectance = 0.04
DetailScale = 30          ; Adds a micro-grain texture to the plastic

; --- RUBBER ---
[Material_Plastic_v2]     ; Using the plastic shader but tweaking it for rubber
Materials = rubber
Brightness = 0.3          ; Very dark
Roughness = 0.95          ; Extremely rough, scatters light
Reflectance = 0.01        ; Almost zero reflection

; --- SEATBELT HARNESS ---
[Material_Fabric_v2]
Materials = belt
Brightness = 0.8
Roughness = 0.85
DetailScale = 40          ; Gives it a woven fabric texture

; ==========================================
; EXTERIOR LIGHTS (EMISSIVE)
; ==========================================

; --- MAIN HEADLIGHTS ---
[EMISSIVE_HEADLIGHTS_0]
NAME = EXT_LIGHTS_GLASS_INNER
COLOR = 255, 240, 220, 30      ; Slight warm white (Halogen/HID look). The '30' is the glow intensity.
LAG = 0.8                      ; Gives a slight fade-in/fade-out like real bulbs

; --- DRL (DAYTIME RUNNING LIGHTS) ---
; By binding to ENGINE, the DRLs will automatically turn on as soon as the car starts, 
; even if the headlights are turned off!
[EMISSIVE_EXTRA_0]
NAME = EXT_LIGHTS.002
COLOR = 255, 255, 255, 35      ; Pure white LED look, very bright
BIND_TO = ENGINE 
LAG = 0.1

; --- REVERSE LIGHT ---
[EMISSIVE_REVERSE_0]
NAME = EXT_LIGHTS.008
COLOR = 255, 255, 255, 25
LAG = 0.5

[EMISSIVE_REVERSE_1]
NAME = EXT_LIGHTS.011
COLOR = 255, 255, 255, 25
LAG = 0.5
