mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-10 22:05:06 +00:00
filters/color-grading: Replace log10 command for GLSL (#510)
Fixes #510
This commit is contained in:
parent
2a48036e7d
commit
fd3d514a20
2 changed files with 10 additions and 2 deletions
|
@ -92,7 +92,7 @@ float3 grade_tint(float3 v) {
|
|||
} else if (pTintMode == TINT_MODE_LOG) { // Log
|
||||
value = (log2(value) + 2.) / 2.333333;
|
||||
} else if (pTintMode == TINT_MODE_LOG10) { // Log10
|
||||
value = (log10(value) + 1.) / 2.;
|
||||
value = (m_log10(value) + 1.) / 2.;
|
||||
}
|
||||
|
||||
float3 tint = float3(0,0,0);
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// HLSL/GLSL Support
|
||||
//------------------------------------------------------------------------------
|
||||
// OBS Studio does not correctly translate all HLSL functionality to GLSL.
|
||||
|
||||
// log10(x) is HLSL-exclusive and not translated by OBS Shader Parser.
|
||||
#define m_log10(x) (log(x) / log(10))
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Uniforms
|
||||
//------------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue