mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-22 05:30:06 -05:00
b690bf8071
-Remove the option --intpalette to format the palette in the xml as ints. If they are not hex formatted, then they should always be float. This option was pointless. -Cleanup some options text for the command line programs. -Allow for dragging around flames in the library tab. This is useful for setting up the order of an animation. -Make the opening of large files in Fractorium much more efficient when not-appending. -Make the opening of large files in all EmberRender and EmberAnimate more efficient. -Better error reporting when opening files. --Bug fixes -Get rid of leftover artifacts that would appear on preview thumbnails when either switching SP/DP or re-rendering previews. -Filename extension was not being appended on Linux when saving as Xml, thus making it impossible to drag that file back in becase drop is filtered on extension. --Code changes -Move GCC compiler spec to C++14. Building with 5.3 now on linux. -Use inline member data initializers. -Make a #define for static for use in Utils.h to make things a little cleaner. -Make various functions able to take arbitrary collections as their parameters rather than just vectors. -Make library collection a list rather than vector. This alleviates the need to re-sync pointers whenever the collection changes. -Subclass QTreeWidget for the library tree. Two new files added for this. -Remove all usage of #ifdef ROW_ONLY_DE in DEOpenCLKernelCreator, it was never used. -Add move constructor and assignment operator to EmberFile. -Add the ability to use a pointer to outside memory in the renderer for the vector of Ember<T>. -Make a lot more functions const where they should be.
84 lines
3.9 KiB
C++
84 lines
3.9 KiB
C++
#pragma once
|
|
|
|
#include "EmberCLPch.h"
|
|
#include "EmberCLStructs.h"
|
|
#include "EmberCLFunctions.h"
|
|
|
|
/// <summary>
|
|
/// FinalAccumOpenCLKernelCreator class.
|
|
/// </summary>
|
|
|
|
namespace EmberCLns
|
|
{
|
|
/// <summary>
|
|
/// Class for creating the final accumulation code in OpenCL.
|
|
/// There are many conditionals in the CPU code to create the
|
|
/// final output image. This class creates many different kernels
|
|
/// with all conditionals and unnecessary calculations stripped out.
|
|
/// The conditionals are:
|
|
/// Early clip/late clip
|
|
/// Alpha channel, no alpha channel
|
|
/// Alpha with/without transparency
|
|
/// </summary>
|
|
class EMBERCL_API FinalAccumOpenCLKernelCreator
|
|
{
|
|
public:
|
|
FinalAccumOpenCLKernelCreator(bool doublePrecision);
|
|
|
|
const string& GammaCorrectionWithAlphaCalcKernel() const;
|
|
const string& GammaCorrectionWithAlphaCalcEntryPoint() const;
|
|
|
|
const string& GammaCorrectionWithoutAlphaCalcKernel() const;
|
|
const string& GammaCorrectionWithoutAlphaCalcEntryPoint() const;
|
|
|
|
const string& FinalAccumEarlyClipKernel() const;
|
|
const string& FinalAccumEarlyClipEntryPoint() const;
|
|
const string& FinalAccumEarlyClipWithAlphaCalcWithAlphaAccumKernel() const;
|
|
const string& FinalAccumEarlyClipWithAlphaCalcWithAlphaAccumEntryPoint() const;
|
|
const string& FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumKernel() const;
|
|
const string& FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumEntryPoint() const;
|
|
|
|
const string& FinalAccumLateClipKernel() const;
|
|
const string& FinalAccumLateClipEntryPoint() const;
|
|
const string& FinalAccumLateClipWithAlphaCalcWithAlphaAccumKernel() const;
|
|
const string& FinalAccumLateClipWithAlphaCalcWithAlphaAccumEntryPoint() const;
|
|
const string& FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumKernel() const;
|
|
const string& FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumEntryPoint() const;
|
|
const string& GammaCorrectionEntryPoint(size_t channels, bool transparency) const;
|
|
const string& GammaCorrectionKernel(size_t channels, bool transparency) const;
|
|
const string& FinalAccumEntryPoint(bool earlyClip, size_t channels, bool transparency, double& alphaBase, double& alphaScale) const;
|
|
const string& FinalAccumKernel(bool earlyClip, size_t channels, bool transparency) const;
|
|
|
|
private:
|
|
string CreateFinalAccumKernelString(bool earlyClip, size_t channels, bool transparency);
|
|
string CreateGammaCorrectionKernelString(bool alphaCalc);
|
|
|
|
string CreateFinalAccumKernelString(bool earlyClip, bool alphaCalc, bool alphaAccum);
|
|
string CreateGammaCorrectionFunctionString(bool globalBucket, bool alphaCalc, bool alphaAccum, bool finalOut);
|
|
string CreateCalcNewRgbFunctionString(bool globalBucket);
|
|
|
|
string m_GammaCorrectionWithAlphaCalcKernel;
|
|
string m_GammaCorrectionWithAlphaCalcEntryPoint = "GammaCorrectionWithAlphaCalcKernel";
|
|
|
|
string m_GammaCorrectionWithoutAlphaCalcKernel;
|
|
string m_GammaCorrectionWithoutAlphaCalcEntryPoint = "GammaCorrectionWithoutAlphaCalcKernel";
|
|
|
|
string m_FinalAccumEarlyClipKernel;//False, false.
|
|
string m_FinalAccumEarlyClipEntryPoint = "FinalAccumEarlyClipKernel";
|
|
string m_FinalAccumEarlyClipWithAlphaCalcWithAlphaAccumKernel;//True, true.
|
|
string m_FinalAccumEarlyClipWithAlphaCalcWithAlphaAccumEntryPoint = "FinalAccumEarlyClipWithAlphaCalcWithAlphaAccumKernel";
|
|
string m_FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumKernel;//False, true.
|
|
string m_FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumEntryPoint = "FinalAccumEarlyClipWithoutAlphaCalcWithAlphaAccumKernel";
|
|
|
|
string m_FinalAccumLateClipKernel;//False, false.
|
|
string m_FinalAccumLateClipEntryPoint = "FinalAccumLateClipKernel";
|
|
string m_FinalAccumLateClipWithAlphaCalcWithAlphaAccumKernel;//True, true.
|
|
string m_FinalAccumLateClipWithAlphaCalcWithAlphaAccumEntryPoint = "FinalAccumLateClipWithAlphaCalcWithAlphaAccumKernel";
|
|
string m_FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumKernel;//False, true.
|
|
string m_FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumEntryPoint = "FinalAccumLateClipWithoutAlphaCalcWithAlphaAccumKernel";
|
|
|
|
string m_Empty;
|
|
bool m_DoublePrecision;
|
|
};
|
|
}
|