96611dd944
Texturev already supports exposure/stops as a way to view details in HDR textures. But results still clip to 1.0 due to 8 bits per channel back buffer. So not viable to view in native HDR. Add UI menu to select scRGB (f16 HDR for windows) and HDR10 (pq/st2084 and rec2020 color primaries) and add shader code to properly display image. The intent is for SDR range content to look identical across all three modes. With additional details available in HDR modes when viewed on HDR monitor. Running into trouble compiling fs_texture_array at the moment. So skipping the changes required in that shader. *sdf.bin.h files changed because of changes in common.sh. Could roll the hdr code into a separate hdr.sh which would leave them be if that would be better?
20 lines
429 B
Python
20 lines
429 B
Python
$input v_texcoord0, v_color0
|
|
|
|
/*
|
|
* Copyright 2011-2018 Branimir Karadzic. All rights reserved.
|
|
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
|
*/
|
|
|
|
#include "common.sh"
|
|
|
|
SAMPLERCUBE(s_texColor, 0);
|
|
|
|
void main()
|
|
{
|
|
vec4 color = textureCubeLod(s_texColor, v_texcoord0, u_textureLod);
|
|
color.xyz = applyExposure(color.xyz);
|
|
color *= v_color0;
|
|
|
|
gl_FragColor = toOutput(color, u_outputFormat, u_sdrWhiteNits);
|
|
}
|