mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0028794: Visualization, Ray tracing - Implement tone mapping
Added enum Graphic3d_ToneMappingMethod for choosing tone mapping mode. Added new rendering parameters. Added tone mapping to Display.fs shader.
This commit is contained in:
@@ -130,6 +130,7 @@ Graphic3d_TextureParams.cxx
|
||||
Graphic3d_TextureParams.hxx
|
||||
Graphic3d_TextureRoot.cxx
|
||||
Graphic3d_TextureRoot.hxx
|
||||
Graphic3d_ToneMappingMethod.hxx
|
||||
Graphic3d_TransformError.hxx
|
||||
Graphic3d_TransformPers.hxx
|
||||
Graphic3d_TransformPers.cxx
|
||||
|
@@ -20,6 +20,7 @@
|
||||
#include <Graphic3d_RenderTransparentMethod.hxx>
|
||||
#include <Graphic3d_RenderingMode.hxx>
|
||||
#include <Graphic3d_StereoMode.hxx>
|
||||
#include <Graphic3d_ToneMappingMethod.hxx>
|
||||
#include <Graphic3d_Vec4.hxx>
|
||||
|
||||
//! Helper class to store rendering parameters.
|
||||
@@ -67,6 +68,9 @@ public:
|
||||
RadianceClampingValue (30.0),
|
||||
RebuildRayTracingShaders (Standard_False),
|
||||
NbRayTracingTiles (16 * 16),
|
||||
ToneMappingMethod (Graphic3d_ToneMappingMethod_Disabled),
|
||||
Exposure (0.f),
|
||||
WhitePoint (1.f),
|
||||
// stereoscopic parameters
|
||||
StereoMode (Graphic3d_StereoMode_QuadBuffer),
|
||||
AnaglyphFilter (Anaglyph_RedCyan_Optimized),
|
||||
@@ -116,6 +120,10 @@ public:
|
||||
Standard_Boolean RebuildRayTracingShaders; //!< forces rebuilding ray tracing shaders at the next frame
|
||||
Standard_Integer NbRayTracingTiles; //!< total number of screen tiles used in adaptive sampling mode (PT only)
|
||||
|
||||
Graphic3d_ToneMappingMethod ToneMappingMethod; //!< specifies tone mapping method for path tracing, Graphic3d_ToneMappingMethod_Disabled by default
|
||||
Standard_ShortReal Exposure; //!< exposure value used for tone mapping (path tracing), 0.0 by default
|
||||
Standard_ShortReal WhitePoint; //!< white point value used in filmic tone mapping (path tracing), 1.0 by default
|
||||
|
||||
Graphic3d_StereoMode StereoMode; //!< stereoscopic output mode, Graphic3d_StereoMode_QuadBuffer by default
|
||||
Anaglyph AnaglyphFilter; //!< filter for anaglyph output, Anaglyph_RedCyan_Optimized by default
|
||||
Graphic3d_Mat4 AnaglyphLeft; //!< left anaglyph filter (in normalized colorspace), Color = AnaglyphRight * theColorRight + AnaglyphLeft * theColorLeft;
|
||||
|
26
src/Graphic3d/Graphic3d_ToneMappingMethod.hxx
Normal file
26
src/Graphic3d/Graphic3d_ToneMappingMethod.hxx
Normal file
@@ -0,0 +1,26 @@
|
||||
// Created on: 2017-05-26
|
||||
// Created by: Andrey GOLODYAEV
|
||||
// Copyright (c) 2017 OPEN CASCADE SAS
|
||||
//
|
||||
// This file is part of Open CASCADE Technology software library.
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify it under
|
||||
// the terms of the GNU Lesser General Public License version 2.1 as published
|
||||
// by the Free Software Foundation, with special exception defined in the file
|
||||
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
|
||||
// distribution for complete text of the license and disclaimer of any warranty.
|
||||
//
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
#ifndef _Graphic3d_ToneMappingMethod_HeaderFile
|
||||
#define _Graphic3d_ToneMappingMethod_HeaderFile
|
||||
|
||||
//! Enumerates tone mapping methods.
|
||||
enum Graphic3d_ToneMappingMethod
|
||||
{
|
||||
Graphic3d_ToneMappingMethod_Disabled, //!< Don't use tone mapping
|
||||
Graphic3d_ToneMappingMethod_Filmic //!< Use filmic tone mapping
|
||||
};
|
||||
|
||||
#endif // _Graphic3d_ToneMappingMethod_HeaderFile
|
Reference in New Issue
Block a user