; config was prepared automatically. source:
; https://github.com/ac-custom-shaders-patch/acc-extension-config/blob/master/config/cars/kunos/ks_toyota_supra_mkiv_tuned.ini
; Other stuff
[INCLUDE]
INCLUDE=common/no_popup_lights.ini
[INCLUDE: common/materials_glass.ini]

[ANIMATION_0]
FILE=car_door_r.ksanim
TIME=2
INPUT=EXTRA_B

[Material_PhotoelasticGlass]
Meshes = SUPRA_LIGHTS_GLASS_EMISSIVE, SUPRA_LIGHTS_GLASS_002
ThicknessMult = 1.5
SHADER = smGlass_phel
PhotoelasticityBaseScale = 4      ; this parameter alters scale in general
PhotoelasticityNoiseScale = 0.05  ; deeply affects randomization process, careful with it
PhotoelasticitySpotsScale = 0.5   ; spots for limiting effect to some areas
PhotoelasticitySpotsOffset = 0.5  ; offset for spots, to try and fit effect nice on existing meshes
PhotoelasticityStripesScale = 3   ; how many stripes are there
FilmIOR = 2.5              ; looks better like this
PhotoelasticityMult = 0.5  ; doesn’t look good if too high
ProfileFix = 0.05          ; a bit thicker edge

[EXTRA_FX]
MASK_GBUFFER = SUPRA_INT_GLASS

[BRAKEDISC_FX]
DEBUG = 0

[BRAKEDISC_FX_FRONT]
DISC_INTERNAL_RADIUS=0.12

[BRAKEDISC_FX_REAR]
DISC_INTERNAL_RADIUS=0.1145

; New car paint
[INCLUDE: common/materials_carpaint.ini]
CarPaintMaterial = supra_body
CarPaintVersionAware = 4
DisableDev = 1

[Material_CarPaint_Metallic]
Skins = 01_sunburst_yellow, 02_midnight_ruby, 03_purple_carbon, 04_lightning_blue, 05_red_carbon, 06_black_carbon, 07_purple_carbon, 08_white_carbon, 09_silver_bullet, 10_white_stripe, 11_black_stripe, 12_blue_stripe
FresnelMax = 0.2
FresnelC = 0.07
FlakesK = 3
BrightnessAdjustment = 0.7
SpecularBase = 0.1, 300
SpecularSun = 0.5, 2000
AmbientSpecular = 2.5
AmbientSpecularEXP= 8
UseDiffuseAlphaAsMask = 0
ClearCoatThickness = 0.01

[SHADER_REPLACEMENT_...]
MATERIALS = supra_exterior_metal, supra_exterior_underside
CAST_SHADOWS = 1
DOUBLE_FACE_SHADOW_BIASED = 1

; Turning lights
[INCLUDE: common/custom_emissive.ini]
DashHighlightColor = 1.4, 0.8, 0.8
HeatingMult = 0.5

[EXTRA_FX_EMISSIVE_...]
MESHES = SUPRA_INT_NEEDLE_001_SUB, SUPRA_INT_NEEDLE_002_SUB, SUPRA_INT_NEEDLE_003_SUB, SUPRA_INT_NEEDLE_004_SUB, SUPRA_INT_NEEDLE_005_SUB	              			; list of meshes
RANGE = 0.03              									; range in meters (by default 0.08 for cars and 5 for tracks)
DIRECTED = 0
IGNORE_TEXTURE_COLOR = 1 								; set to 1 to use COLOR and emissive color only
COLOR = 1.5, 0, 0, 1.7
EMISSIVE_TWEAK = 35       									; 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 = 30            									; MIP bias for texture (increase for smoother light)

[EXTRA_FX_EMISSIVE_...]
MESHES = SUPRA_DASH_DIALS	              			; list of meshes
RANGE = 0.07              									; range in meters (by default 0.08 for cars and 5 for tracks)
DIRECTED = 0
EMISSIVE_TWEAK = 50       									; 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 = 50            									; MIP bias for texture (increase for smoother light)

[EXTRA_FX_EMISSIVE_...]
MESHES = SUPRA_INT_DETAIL_003, SUPRA_INT_DETAIL_005, SUPRA_INT_DETAIL_006	              			; list of meshes
RANGE = 0.03              									; range in meters (by default 0.08 for cars and 5 for tracks)
DIRECTED = 0
EMISSIVE_TWEAK = 20       									; 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 = 25            									; MIP bias for texture (increase for smoother light)

[EXTRA_FX_EMISSIVE_...]
MESHES = SUPRA_INT_DETAIL_002	              			; list of meshes
RANGE = 0.05              									; range in meters (by default 0.08 for cars and 5 for tracks)
DIRECTED = 0
EMISSIVE_TWEAK = 6       									; 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 = 6            									; MIP bias for texture (increase for smoother light)

[CustomEmissive]
Meshes = SUPRA_LIGHTS_FRONT_BUMPER, LOD_B_SUPRA_LIGHTS_FRONT_BUMPER, LOD_C_SUPRA_LIGHTS_FRONT_BUMPER
@ = CustomEmissive_Color, Channel = 3, Mirror, Color = "1, 0.5, 0"
@ = TurningLightsFrontCorner, Channel = 3 ; shortcut for lights split into front and side

[CustomEmissive]
Meshes = SUPRA_LIGHTS
@ = CustomEmissive_Color, Channel = 2, Color = "1, 1, 1", Threshold = 0.95
@ = ReverseLights, Channel = 2, Offset = "-0.51, 0.19, -0.26"
@ = CustomEmissive_Color, Channel = 3, Mirror, Color = "1, 0.5, 0", Threshold = 0.85
@ = TurningLights, Channel = 3, Location = REAR

[CustomEmissive]
Meshes = SUPRA_MAIN_DASH
DashHighlightColor=1,1,1,0.5
@ = CustomEmissive_Rect, Channel = 0, Start = "0, 0", Size = "1, 1"
@ = CustomEmissive_Rect, Channel = 1, Resolution = 1024, Start = "743, 100", Size = "50, 45", CornerRadius = 0.2
@ = DashHighlight, Channel = 0
@ = CustomEmissive_UseDiffuseLuminocity,From = 0.15, To = 0.2, SkipDiffuseMap = 0
@ = DashIndicator, Channel = 1, Input = STALLED, Intensity = 0.2

[CustomEmissive]
Meshes = SUPRA_INT_DETAIL_002
@ = AlphaFromTxDiffuse
@ = CustomEmissive_Rect, Channel = 2, Resolution = 1024, Start = "950, 0", Size = "70, 60"
@ = DashIndicator, Channel = 2, Input = HAZARD, Intensity = 0.5
MirrorOffset = -0.35
@ = CustomEmissive_Rect, Channel = 3, Mirror, Resolution = 1024, Start = "180, 352", Size = "60, 45"
@ = DashTurningLights, Channel = 3

[]
@ = DashIndicator, Meshes = SUPRA_INT_LIGHT, Input = HIGHBEAM, DashHighlight


; License plate light
[LIGHT_LICENSEPLATE]
ACTIVE = 1
MESHES = R_plate_SUB0.001
OFFSET = 0, 0.02, -0.04
RANGE=0.75
RANGE_GRADIENT_OFFSET=0
SPOT=170
SPOT_SHARPNESS=0.2
COLOR=5,6,7,1.5
FALLBACK_EMISSIVE=1,1,1,0.9
LAYOUT=ONE_ON_TOP
FADE_AT=10
FADE_SMOOTH=150
ACTIVE=1
AFFECTS_TRACK=1
LAYOUT = ONE_ON_TOP


; Odometers
[ODOMETER_MAIN]
NAME = SUPRA_MAIN_DASH
FONT = arial_big
FONT_SCALE = 0.8
POSITION = 314, 136
SIZE = 150, 27
DIGIT_WIDTH = 20
COUNT = 6
BACKGROUND = 0.12
MOVEMENT_INTERVAL = 5

[ODOMETER_TRIP]
NAME = SUPRA_MAIN_DASH
FONT = arial_big
FONT_SCALE = 0.8
POSITION = 329, 267
SIZE = 118, 27
DIGIT_WIDTH = 20
COUNT = 4
LAST_DIGIT_BACKGROUND_LOCATION = 0, 0
BACKGROUND = 0.12

[REFRACTING_HEADLIGHT_...]
SURFACE = SUPRA_LIGHTS_GLASS_FRONT_BUMPER
SURFACE_LODS = LOD_B_SUPRA_LIGHTS_GLASS_FRONT_BUMPER_001
INSIDE = SUPRA_LIGHTS_FRONT_BUMPER, SUPRA_EXT_PLASTIC_FRONT_BUMPER

ABSORPTION = 0.02
AMBIENT_MULT = 0.25
BASE_EMISSIVE_K = 0.05
BOUNCED_BACK_MULT = 0.4
BULB_BLUR_K = 2
BULB_REFLECTION_K = -0.1
CUSTOM_BULB_0 = 1, 0.5, 0.045, 0 ; using fake bulbs to limit main one
CUSTOM_BULB_1 = 0, 0.5, 0.03, 0
CUSTOM_BULB_2 = 0.5, 0.5, 0, 0
CUSTOM_BULB_3 = 0.676, 0.485, 0.029, 0
DIFFUSE_MAP_FILTER_MULT = 1
DIFFUSE_MAP_MULT = 1
DIRECTION = 0, 0, -1
DYNAMIC_EMISSIVE_MAP = 0
EMISSIVE_MULT = 1
EXTRA_SIDE_THICKNESS = 0
F0 = 0.8
GLASS_COLOR = 0.25, 0.25, 0.25
GLASS_EMISSIVE_MULT = 0.25
GLASS_EXTRA_THICKNESS = 0.005
INNER_SPECULAR = 10
INNER_SPECULAR_EXP = 800
IOR = 1.5
MIRROR_DIR = 1, 0, 0
MIRROR_POS = 0, 0.44088, 2.06468
NM_SHARE_EXT = 0
NM_SHARE_INT = 0.6
ORIGIN = 0.611298, 0.44088, 2.13116
RADIUS = 0.08587
SIDE_FALLOFF = 2
USE_COLORED_BULBS = 1
USE_CUSTOM_BULBS = 1
USE_NORMAL_ALPHA = 1

[EMISSIVE_...]
NAME=SUPRA_FRONT_LIGHT_MAIN_002
COLOR=2.7, 2.5, 2.3, 250
LOCATION=FRONT
BIND_TO=LIGHT
LAG=0.5

[EMISSIVE_...]
NAME=SUPRA_FRONT_LIGHT_MAIN_001
COLOR=2.7, 2.5, 2.3, 400
LOCATION=FRONT
BIND_TO=LIGHT
LAG=0.5

[EMISSIVE_...]
NAME=SUPRA_FRONT_LIGHT_BULBS
COLOR=6, 5.5, 5, 550
LOCATION=FRONT
BIND_TO=LIGHT
LAG=0.5


; Self-lighting:
[INCLUDE: common/selflighting.ini]

[SelfLight_Headlights]
MIRROR = 0.42
DIRECTION = 0, 0, 1
POSITION = 0, 0.605, 1.89
DIFFUSE_CONCENTRATION = 1
BOUND_TO = SUPRA_FRONT_LIGHT_BULBS
SPOT_SHARPNESS = 0.5
SPOT = 70
COLOR = 2,2,2.5,250
SPECULAR_MULT = 1.2
RANGE = 0.35

[SelfLight_Headlights]
MIRROR = 0.54
DIRECTION = 0, 0, 1
POSITION = 0, 0.61, 1.88
DIFFUSE_CONCENTRATION = 1
BOUND_TO = SUPRA_FRONT_LIGHT_MAIN_002
SPOT_SHARPNESS = 0.5
SPOT = 60
COLOR = 3,3,4,200
SPECULAR_MULT = 1.2
RANGE = 0.25

[]
Meshes = SUPRA_LIGHTS_GLASS_FRONT_BUMPER
@ = TurningLights, Channel = 3, NotCastingLight

[SHADER_REPLACEMENT_...]
MATERIALS = supra_exterior_metal
PROP_... = extExtraSharpLocalReflections, -0.001

[SHADER_REPLACEMENT_...]
MATERIALS = supra_glass
CULL_MODE = FRONT



[ANIMATION_...]
INPUT = EXTRA_A            ; bind to reverse gear
FILE = hood.ksanim    ; file name of new animation in “animations” folder
TIME = 1.0                  ; animation time
INPUT_AS_PROGRESS = 0       ; set to 1 to switch to that second input-as-progress mode
LOOP_WHILE_ACTIVE = 0       ; if set to 0, animation would go to 0% if not triggered, and 
                            ; to 100% otherwise; if set to 1, animation would play in 
                            ; a loop if triggered and stop otherwise
LOOP_KEEP_UNTIL_DONE = 1    ; only for “LOOP_WHILE_ACTIVE”: set to 1 to make animation 
                            ; go to 0% if stopped (like wipers would do, for example)
TICK_TOCK_MODE = 0          ; only for “LOOP_WHILE_ACTIVE”: loop as 0% → 100% → 0% instead 
                            ; of jumping from 100% to 0%
AFFECTS_INTERIOR_SHAPE = 1  ; force to update interior reflections mask if animation is 
                            ; playing (slower)


[EXHAUST_FLAMES]
ANTILAG=1.0
ANTILAG_DELAY=0.02
ANTILAG_INTENSITY=140
ANTILAG_INTERVAL_MAX=10.0
ANTILAG_INTERVAL_MIN=0.0
ANTILAG_TURBO_THRESHOLD=0.4
DAMAGE=0
DAMAGE_DURATION=0.00
DAMAGE_INTENSITY=0
DAMAGE_PROBABILITY=0
DISCHARGE=1
DISCHARGE_CHARGE_TIME=0
DISCHARGE_DELAY=0.02
DISCHARGE_DURATION=2
DISCHARGE_INTENSITY=100
DISCHARGE_PROBABILITY=8
DISCHARGE_RPM_THRESHOLD_MAX=8000
DISCHARGE_RPM_THRESHOLD_MIN=3000
DISCHARGE_WATER_TEMPERATURE_THRESHOLD=60
FLAT_SHIFT=1
FLAT_SHIFT_COOLDOWN=0.5
FLAT_SHIFT_DURATION=0.01
FLAT_SHIFT_GAS_THRESHOLD=50
FLAT_SHIFT_INTENSITY=0.25
FLAT_SHIFT_PROBABILITY=0.4
FLAT_SHIFT_RPM_THRESHOLD=8000
LIMITER=8000
LIMITER_DELAY=0.0
LIMITER_INTENSITY=3
LIMITER_RPM_THRESHOLD=8000

[EMISSIVE_...] Headlights
INPUT=LIGHT
BIND_TO_HEADLIGHTS=1
NAME = needle004_SUB1,needle003_SUB1,needle002_SUB1,INT_Gauge1,Object041,INT_Gauge2
COLOR= 10,10,10,0.05
OFF_COLOR = 0,0,0,0
LAG=0.3
SIMULATE_HEATING=0
AFFECTS_TRACK=1

