mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 22:55:41 +00:00
Handle range adaption in texture remapping
* This can be used in saving overlays, stencil, etc
This commit is contained in:
@@ -69,6 +69,8 @@ void main(void)
|
||||
color_out = SampleTextureFloat4(texType, scr, texdisplay.Slice, texdisplay.MipLevel,
|
||||
texdisplay.SampleIdx, texdisplay.TextureResolutionPS,
|
||||
texdisplay.YUVDownsampleRate, texdisplay.YUVAChannels);
|
||||
|
||||
color_out = ((color_out - texdisplay.RangeMinimum) * texdisplay.InverseRangeSize);
|
||||
#endif
|
||||
|
||||
if(texdisplay.Channels == vec4(1, 0, 0, 0))
|
||||
|
||||
@@ -33,9 +33,13 @@ struct v2f
|
||||
|
||||
float4 RENDERDOC_TexRemapFloat(v2f IN) : SV_Target0
|
||||
{
|
||||
return SampleTextureFloat4(OutputDisplayFormat & TEXDISPLAY_TYPEMASK,
|
||||
(ScalePS < 1 && MipLevel == 0), IN.tex.xy, Slice, MipLevel, SampleIdx,
|
||||
TextureResolutionPS, YUVDownsampleRate, YUVAChannels);
|
||||
float4 ret = SampleTextureFloat4(OutputDisplayFormat & TEXDISPLAY_TYPEMASK,
|
||||
(ScalePS < 1 && MipLevel == 0), IN.tex.xy, Slice, MipLevel,
|
||||
SampleIdx, TextureResolutionPS, YUVDownsampleRate, YUVAChannels);
|
||||
|
||||
ret = ((ret - RangeMinimum) * InverseRangeSize);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint4 RENDERDOC_TexRemapUInt(v2f IN) : SV_Target0
|
||||
|
||||
Reference in New Issue
Block a user