Skip to content

Commit

Permalink
Merge commit '07496b099fc5a9bf332ac02edfdbdcbb516a2514' into usdGeomC…
Browse files Browse the repository at this point in the history
…amera-exposure-storm
  • Loading branch information
pmolodo committed Dec 18, 2024
2 parents 1a69581 + 07496b0 commit 684f18d
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 387 deletions.
8 changes: 4 additions & 4 deletions pxr/imaging/hd/camera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ HdCamera::HdCamera(SdfPath const &id)
, _exposureIso(100.0f)
, _exposureFStop(1.0f)
, _exposureResponsivity(1.0f)
, _exposureScale(1.0f)
, _linearExposureScale(1.0f)
, _lensDistortionType(HdCameraTokens->standard)
, _lensDistortionK1(0.0f)
, _lensDistortionK2(0.0f)
Expand Down Expand Up @@ -271,11 +271,11 @@ HdCamera::Sync(HdSceneDelegate * sceneDelegate,
_exposureResponsivity = vExposureResponsivity.Get<float>();
}

const VtValue vExposureScale =
const VtValue vLinearExposureScale =
sceneDelegate->GetCameraParamValue(
id, HdCameraTokens->linearExposureScale);
if (!vExposureScale.IsEmpty()) {
_exposureScale = vExposureScale.Get<float>();
if (!vLinearExposureScale.IsEmpty()) {
_linearExposureScale = vLinearExposureScale.Get<float>();
}

const VtValue vLensDistortionType =
Expand Down
10 changes: 5 additions & 5 deletions pxr/imaging/hd/camera.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PXR_NAMESPACE_OPEN_SCOPE
(exposureIso) \
(exposureFStop) \
(exposureResponsivity) \
(linearExposureScale) \
(linearExposureScale) \
\
/* how to match window with different aspect */ \
(windowPolicy) \
Expand Down Expand Up @@ -245,7 +245,7 @@ class HdCamera : public HdSprim
///
/// This the same as the value stored in the exposure attribute on the
/// underlying camera. Note that in most cases, you will want to use
/// GetExposureScale() instead of this method, as it is the computed
/// GetLinearExposureScale() instead of this method, as it is the computed
/// end result of all related exposure attributes.
/// GetExposure() is retained as-is for backward compatibility.
float GetExposure() const {
Expand All @@ -257,8 +257,8 @@ class HdCamera : public HdSprim
/// Scaling the image brightness by this value will cause the various
/// exposure controls on \ref UsdGeomCamera to behave like those of a real
/// camera to control the exposure of the image.
float GetExposureScale() const {
return _exposureScale;
float GetLinearExposureScale() const {
return _linearExposureScale;
}

TfToken GetLensDistortionType() const {
Expand Down Expand Up @@ -344,7 +344,7 @@ class HdCamera : public HdSprim
float _exposureIso;
float _exposureFStop;
float _exposureResponsivity;
float _exposureScale;
float _linearExposureScale;

// lens distortion
TfToken _lensDistortionType;
Expand Down
18 changes: 9 additions & 9 deletions pxr/imaging/hd/cameraSchema.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ HdCameraSchema::GetExposureResponsivity() const
}

HdFloatDataSourceHandle
HdCameraSchema::GetExposureScale() const
HdCameraSchema::GetLinearExposureScale() const
{
return _GetTypedDataSource<HdFloatDataSource>(
HdCameraSchemaTokens->linearExposureScale);
Expand Down Expand Up @@ -213,7 +213,7 @@ HdCameraSchema::BuildRetained(
const HdFloatDataSourceHandle &exposureIso,
const HdFloatDataSourceHandle &exposureFStop,
const HdFloatDataSourceHandle &exposureResponsivity,
const HdFloatDataSourceHandle &exposureScale,
const HdFloatDataSourceHandle &linearExposureScale,
const HdBoolDataSourceHandle &focusOn,
const HdFloatDataSourceHandle &dofAspect,
const HdContainerDataSourceHandle &splitDiopter,
Expand Down Expand Up @@ -311,9 +311,9 @@ HdCameraSchema::BuildRetained(
_values[_count++] = exposureResponsivity;
}

if (exposureScale) {
if (linearExposureScale) {
_names[_count] = HdCameraSchemaTokens->linearExposureScale;
_values[_count++] = exposureScale;
_values[_count++] = linearExposureScale;
}

if (focusOn) {
Expand Down Expand Up @@ -480,10 +480,10 @@ HdCameraSchema::Builder::SetExposureResponsivity(
}

HdCameraSchema::Builder &
HdCameraSchema::Builder::SetExposureScale(
const HdFloatDataSourceHandle &exposureScale)
HdCameraSchema::Builder::SetLinearExposureScale(
const HdFloatDataSourceHandle &linearExposureScale)
{
_exposureScale = exposureScale;
_linearExposureScale = linearExposureScale;
return *this;
}

Expand Down Expand Up @@ -548,7 +548,7 @@ HdCameraSchema::Builder::Build()
_exposureIso,
_exposureFStop,
_exposureResponsivity,
_exposureScale,
_linearExposureScale,
_focusOn,
_dofAspect,
_splitDiopter,
Expand Down Expand Up @@ -656,7 +656,7 @@ HdCameraSchema::GetExposureResponsivityLocator()

/* static */
const HdDataSourceLocator &
HdCameraSchema::GetExposureScaleLocator()
HdCameraSchema::GetLinearExposureScaleLocator()
{
static const HdDataSourceLocator locator =
GetDefaultLocator().Append(
Expand Down
14 changes: 7 additions & 7 deletions pxr/imaging/hd/cameraSchema.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class HdCameraSchema : public HdSchema
HdFloatDataSourceHandle GetExposureResponsivity() const;

HD_API
HdFloatDataSourceHandle GetExposureScale() const;
HdFloatDataSourceHandle GetLinearExposureScale() const;

HD_API
HdBoolDataSourceHandle GetFocusOn() const;
Expand Down Expand Up @@ -218,9 +218,9 @@ class HdCameraSchema : public HdSchema
HD_API
static const HdDataSourceLocator &GetExposureResponsivityLocator();

/// Prim-level relative data source locator to locate exposureScale.
/// Prim-level relative data source locator to locate linearExposureScale.
HD_API
static const HdDataSourceLocator &GetExposureScaleLocator();
static const HdDataSourceLocator &GetLinearExposureScaleLocator();

/// Prim-level relative data source locator to locate namespacedProperties.
HD_API
Expand Down Expand Up @@ -257,7 +257,7 @@ class HdCameraSchema : public HdSchema
const HdFloatDataSourceHandle &exposureIso,
const HdFloatDataSourceHandle &exposureFStop,
const HdFloatDataSourceHandle &exposureResponsivity,
const HdFloatDataSourceHandle &exposureScale,
const HdFloatDataSourceHandle &linearExposureScale,
const HdBoolDataSourceHandle &focusOn,
const HdFloatDataSourceHandle &dofAspect,
const HdContainerDataSourceHandle &splitDiopter,
Expand Down Expand Up @@ -326,8 +326,8 @@ class HdCameraSchema : public HdSchema
Builder &SetExposureResponsivity(
const HdFloatDataSourceHandle &exposureResponsivity);
HD_API
Builder &SetExposureScale(
const HdFloatDataSourceHandle &exposureScale);
Builder &SetLinearExposureScale(
const HdFloatDataSourceHandle &linearExposureScale);
HD_API
Builder &SetFocusOn(
const HdBoolDataSourceHandle &focusOn);
Expand Down Expand Up @@ -366,7 +366,7 @@ class HdCameraSchema : public HdSchema
HdFloatDataSourceHandle _exposureIso;
HdFloatDataSourceHandle _exposureFStop;
HdFloatDataSourceHandle _exposureResponsivity;
HdFloatDataSourceHandle _exposureScale;
HdFloatDataSourceHandle _linearExposureScale;
HdBoolDataSourceHandle _focusOn;
HdFloatDataSourceHandle _dofAspect;
HdContainerDataSourceHandle _splitDiopter;
Expand Down
2 changes: 1 addition & 1 deletion pxr/imaging/hd/hdSchemaDefs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@
('exposureIso', T_FLOAT, dict(ADD_LOCATOR = True)),
('exposureFStop', T_FLOAT, dict(ADD_LOCATOR = True)),
('exposureResponsivity', T_FLOAT, dict(ADD_LOCATOR = True)),
('exposureScale', T_FLOAT, dict(ADD_LOCATOR = True)),
('linearExposureScale', T_FLOAT, dict(ADD_LOCATOR = True)),
('focusOn', T_BOOL, {}),
('dofAspect', T_FLOAT, {}),
('splitDiopter', 'HdSplitDiopterSchema', {}),
Expand Down
4 changes: 2 additions & 2 deletions pxr/imaging/hdx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pxr_library(hdx
colorCorrectionTask
drawTargetTask
effectsShader
exposureScaleTask
linearExposureScaleTask
freeCameraSceneDelegate
fullscreenShader
hgiConversions
Expand Down Expand Up @@ -87,7 +87,7 @@ pxr_library(hdx
shaders/boundingBox.glslfx
shaders/colorChannel.glslfx
shaders/colorCorrection.glslfx
shaders/exposureScale.glslfx
shaders/linearExposureScale.glslfx
shaders/fullscreen.glslfx
shaders/oitResolveImageShader.glslfx
shaders/outline.glslfx
Expand Down
174 changes: 0 additions & 174 deletions pxr/imaging/hdx/exposureScaleTask.cpp

This file was deleted.

Loading

0 comments on commit 684f18d

Please sign in to comment.