From 5d7fe43f64e904d5873d6c2f6e53b90e82753c7b Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 3 Dec 2010 02:40:25 -0600 Subject: Add CameraCoCRatio to make DoF depending on screen resolution. --- indra/newview/app_settings/settings.xml | 14 +++++++++++++- indra/newview/pipeline.cpp | 3 ++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index ef3803aed6..10799a6ed8 100755 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -1380,7 +1380,19 @@ 0.05 - + CameraCoCRatio + + Comment + Ratio of circle of confusion to vertical resolution for DoF effect. + Persist + 1 + Type + F32 + Value + 54 + + + CertStore Comment diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 31200675fc..717c97c6d4 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -6161,8 +6161,9 @@ void LLPipeline::renderBloom(BOOL for_snapshot, F32 zoom_factor, int subfield) subject_distance *= 1000.f; F32 fnumber = gSavedSettings.getF32("CameraFNumber"); F32 focal_length = gSavedSettings.getF32("CameraFocalLength"); - F32 coc = gSavedSettings.getF32("CameraCoC"); + F32 coc_ratio = gSavedSettings.getF32("CameraCoCRatio"); + F32 coc = coc_ratio/mScreen.getHeight(); F32 hyperfocal_distance = (focal_length*focal_length)/(fnumber*coc); -- cgit v1.2.3