This is some HSV code I am trying to port to Oblivion Reloaded. It originally came from a Skyrim ENB, but I'd like to run it in Oblivion.
This is an excerpt, but I'm getting an error:
Code:
LINE 1: float4 color = tex2D(renderSampler, IN.UVCoord);
LINE 2: float3 hsvcolor = RGBtoHSV( color.xyz );
LINE 3: hsvcolor.x = fColorHueMod + ( fColorHueMult * pow( hsvcolor.x, fColorHuePow ) );
LINE 4: hsvcolor.y = fColorSaturationMod + ( fColorSaturationMult * pow( hsvcolor.y, fColorSaturationPow ) );
LINE 5: hsvcolor.z = fColorIntensityMod + ( fColorIntensityMult * pow( hsvcolor.z, fColorIntensityPow ) );
LINE 6: hsvcolor.y = ColorEqualizerMod( hsvcolor.x ) + ( ColorEqualizerMult( hsvcolor.x ) * pow( hsvcolor.y, ColorEqualizerPow( hsvcolor.x ) ) );
LINE 7: hsvcolor.yz = max( hsvcolor.yz, 0.0 );
LINE 8: color.xyz = HSVtoRGB( hsvcolor );
LINE 9: return color;
The error I get from the compiler is "warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them" for lines 4, 5 and 6 (Obviously, the "LINE: x" is not in the code, I just wanted to clarify where the error comes from. The effect compiles though. I just would like to get rid of the error. Any help would be greatly appreciated. What I posted is not all of the code. If you need to see the whole thing just let me know and I will post it.