That's possible yes, caelUI does it, you should be able to change this to your likings.
This code is by Caellian, I just changed it a little so it'll work standalone:
Code:
local f = CreateFrame("Frame")
local ZoneChange = function(zone)
local _, instanceType = IsInInstance()
if zone == "Dalaran" then
SetCVar("useWeatherShaders", "0")
SetCVar("weatherDensity", 0)
SetCVar("environmentDetail", 0.5)
SetCVar("groundEffectDensity", 16)
SetCVar("groundEffectDist", 0)
SetCVar("particleDensity", 0.11)
SetCVar("projectedTextures", 0)
SetCVar("chatBubbles", 0)
elseif instanceType == "raid" then
SetCVar("useWeatherShaders", "0")
SetCVar("weatherDensity", 0)
SetCVar("environmentDetail", 1.5)
SetCVar("groundEffectDensity", 256)
SetCVar("groundEffectDist", 45)
SetCVar("particleDensity", 1)
SetCVar("projectedTextures", 1)
SetCVar("chatBubbles", 1)
else
SetCVar("useWeatherShaders", "1")
SetCVar("weatherDensity", 3)
SetCVar("environmentDetail", 1.5)
SetCVar("groundEffectDensity", 128)
SetCVar("groundEffectDist", 45)
SetCVar("particleDensity", 1)
SetCVar("projectedTextures", 1)
SetCVar("chatBubbles", 0)
end
end
f:RegisterEvent("ZONE_CHANGED_NEW_AREA")
f:RegisterEvent("WORLD_MAP_UPDATE")
f:RegisterEvent("PLAYER_ENTERING_WORLD")
f:SetScript("OnEvent", function(self, event)
if event == "ZONE_CHANGED_NEW_AREA" or event == "WORLD_MAP_UPDATE" or event == "PLAYER_ENTERING_WORLD" then
local zone = GetRealZoneText()
if zone and zone ~= "" then
return ZoneChange(zone)
end
end
end)
Complete list of cvars with their default values:
http://wowprogramming.com/docs/cvars
You can look in your own config.wtf files in the WTF folder to see the value of your current settings.