mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-02 14:26:17 -04:00
--Code changes
-Bump to version 1.0.0.3 -Remove all code for opacity adjustment, it's no longer needed. -Small optimization on accumulating to the histogram on the CPU.
This commit is contained in:
@ -168,7 +168,6 @@ struct ALIGN XformCL
|
||||
T m_ColorSpeedCache;//88 (176)
|
||||
T m_OneMinusColorCache;//92 (184)
|
||||
T m_Opacity;//96 (192)
|
||||
T m_VizAdjusted;//100 (200)
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
@ -184,7 +183,6 @@ static const char* XformCLStructString =
|
||||
" real_t m_ColorSpeedCache;\n"
|
||||
" real_t m_OneMinusColorCache;\n"
|
||||
" real_t m_Opacity;\n"
|
||||
" real_t m_VizAdjusted;\n"
|
||||
"} XformCL;\n"
|
||||
"\n";
|
||||
|
||||
|
@ -490,15 +490,15 @@ string IterOpenCLKernelCreator<T>::CreateIterKernelString(const Ember<T>& ember,
|
||||
if (lockAccum)
|
||||
{
|
||||
os <<
|
||||
" AtomicAdd(&(histogram[histIndex].m_Reals[0]), palColor1.x * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_VizAdjusted);\n"//Always apply opacity, even though it's usually 1.
|
||||
" AtomicAdd(&(histogram[histIndex].m_Reals[1]), palColor1.y * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_VizAdjusted);\n"
|
||||
" AtomicAdd(&(histogram[histIndex].m_Reals[2]), palColor1.z * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_VizAdjusted);\n"
|
||||
" AtomicAdd(&(histogram[histIndex].m_Reals[3]), palColor1.w * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_VizAdjusted);\n";
|
||||
" AtomicAdd(&(histogram[histIndex].m_Reals[0]), palColor1.x * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_Opacity);\n"//Always apply opacity, even though it's usually 1.
|
||||
" AtomicAdd(&(histogram[histIndex].m_Reals[1]), palColor1.y * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_Opacity);\n"
|
||||
" AtomicAdd(&(histogram[histIndex].m_Reals[2]), palColor1.z * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_Opacity);\n"
|
||||
" AtomicAdd(&(histogram[histIndex].m_Reals[3]), palColor1.w * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_Opacity);\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
os <<
|
||||
" histogram[histIndex].m_Real4 += (palColor1 * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_VizAdjusted);\n";//real_bucket_t should always be float.
|
||||
" histogram[histIndex].m_Real4 += (palColor1 * (real_bucket_t)xforms[secondPoint.m_LastXfUsed].m_Opacity);\n";//real_bucket_t should always be float.
|
||||
}
|
||||
|
||||
os <<
|
||||
|
@ -1781,7 +1781,6 @@ void RendererCL<T, bucketT>::ConvertEmber(Ember<T>& ember, EmberCL<T>& emberCL,
|
||||
xformsCL[i].m_ColorSpeedCache = xform->ColorSpeedCache();
|
||||
xformsCL[i].m_OneMinusColorCache = xform->OneMinusColorCache();
|
||||
xformsCL[i].m_Opacity = xform->m_Opacity;
|
||||
xformsCL[i].m_VizAdjusted = xform->VizAdjusted();
|
||||
|
||||
for (size_t varIndex = 0; varIndex < xform->TotalVariationCount() && varIndex < MAX_CL_VARS; varIndex++)//Assign all variation weights for this xform, with a max of MAX_CL_VARS.
|
||||
xformsCL[i].m_VariationWeights[varIndex] = xform->GetVariation(varIndex)->m_Weight;
|
||||
|
Reference in New Issue
Block a user