Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typo bugs in hlsl versions of yiq2rgb and hsv2rgb #143

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions color/space/hsv2rgb.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ use: <float3|float4> hsv2rgb(<float3|float4> hsv)

#ifndef FNC_HSV2RGB
#define FNC_HSV2RGB
float3 hsv2rgb(in float3 hsb) {
return ((hue2rgb(hsb.x) - 1.0) * hsv.y + 1.0) * hsv.z;
}
float4 hsv2rgb(in float4 hsb) { return float4(hsv2rgb(hsb.rgb), hsb.a); }
#endif
float3 hsv2rgb(in float3 hsv) { return ((hue2rgb(hsv.x) - 1.0) * hsv.y + 1.0) * hsv.z; }
float4 hsv2rgb(in float4 hsv) { return float4(hsv2rgb(hsv.rgb), hsv.a); }
#endif
2 changes: 1 addition & 1 deletion color/space/yiq2rgb.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ const float3x3 YIQ2RGB = float3x3( 1.0, 0.9469, 0.6235,

#ifndef FNC_YIQ2RGB
#define FNC_YIQ2RGB
float3 yiq2rgb(in float3 yiq) { return mul(yiq2rgb_mat, yiq); }
float3 yiq2rgb(in float3 yiq) { return mul(YIQ2RGB, yiq); }
float4 yiq2rgb(in float4 yiq) { return float4(yiq2rgb(yiq.rgb), yiq.a); }
#endif