Skip to content

Commit

Permalink
test hdr10ified
Browse files Browse the repository at this point in the history
  • Loading branch information
audaki committed Apr 18, 2024
1 parent 5b86bdd commit e915329
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions resource/shaders/HDR/basic_hdr_shader_ps.hlsl
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,9 @@ main (PS_INPUT input) : SV_TARGET
hdr_color.g *= (orig_color.g >= FLT_EPSILON);
hdr_color.b *= (orig_color.b >= FLT_EPSILON);

hdr_color = FinalOutput (hdr_color);

//hdr_color.rgb = clamp (LinearToPQ (REC709toREC2020 (hdr_color.rgb), 125.0f), 0.0, 1.0);
//hdr_color.rgb *= smoothstep (0.006978, 0.016667, hdr_color.rgb);
//hdr_color = FinalOutput (hdr_color);
hdr_color.rgb = clamp (LinearToPQ (REC709toREC2020 (hdr_color.rgb), 125.0f), 0.0, 1.0);
hdr_color.rgb *= smoothstep (0.006978, 0.016667, hdr_color.rgb);
}

int cs = visualFunc.x - VISUALIZE_REC709_GAMUT;
Expand All @@ -262,9 +261,9 @@ main (PS_INPUT input) : SV_TARGET
float3 b = float3(_ColorSpaces[cs].xb, _ColorSpaces[cs].yb, 0);

float3 vColor_XYZ = RGB_to_XYZ(hdr_color.rgb);
float3 vColor_xyY = SK_Color_xyY_from_RGB(_ColorSpaces[0], hdr_color.rgb);
//float3 vColor_xyY = SK_Color_xyY_from_RGB(_ColorSpaces[0], hdr_color.rgb);
//float3 vColor_xyY = SK_Color_xyY_from_RGB(_ColorSpaces[cs], hdr_color.rgb);
//float3 vColor_xyY = float3 ( vColor_XYZ.x / ( vColor_XYZ.x + vColor_XYZ.y + vColor_XYZ.z ), vColor_XYZ.y / ( vColor_XYZ.x + vColor_XYZ.y + vColor_XYZ.z ), 1.0 - ( vColor_XYZ.x / ( vColor_XYZ.x + vColor_XYZ.y + vColor_XYZ.z ) ) - ( vColor_XYZ.y / ( vColor_XYZ.x + vColor_XYZ.y + vColor_XYZ.z ) ) );
float3 vColor_xyY = float3(vColor_XYZ.x / (vColor_XYZ.x + vColor_XYZ.y + vColor_XYZ.z), vColor_XYZ.y / (vColor_XYZ.x + vColor_XYZ.y + vColor_XYZ.z), 0);

r.z = 0;
g.z = 0;
Expand Down

0 comments on commit e915329

Please sign in to comment.