mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -07:00
vkd3d-shader/hlsl: Implement tex2Dbias().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56701 Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Henri Verbeet
parent
f0cd35b40d
commit
ccbe36fb8d
Notes:
Henri Verbeet
2024-06-11 17:09:30 +02:00
Approved-by: Elizabeth Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/876
@@ -42,3 +42,31 @@ probe all rgba (4.0, 0.0, 10.0, 0.0)
|
||||
uniform 0 float4 8.5 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
probe all rgba (0.0, 0.0, 10.0, 0.0)
|
||||
|
||||
[require]
|
||||
shader model >= 3.0
|
||||
options: backcompat
|
||||
|
||||
[pixel shader todo(sm<4) fail(sm>=6)]
|
||||
sampler s;
|
||||
float bias;
|
||||
|
||||
float4 main(float2 coord : texcoord) : sv_target
|
||||
{
|
||||
/* Choice of initial mipmap level is hardware-dependent, and in practice
|
||||
* varies too much to be reasonably covered by ULPS. Quantize instead. */
|
||||
return floor(tex2Dbias(s, float4(coord, 0, bias)) * 10);
|
||||
}
|
||||
|
||||
[test]
|
||||
uniform 0 float4 6.5 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
probe all rgba (10.0, 0.0, 10.0, 0.0)
|
||||
|
||||
uniform 0 float4 7.5 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
probe all rgba (4.0, 0.0, 10.0, 0.0)
|
||||
|
||||
uniform 0 float4 8.5 0.0 0.0 0.0
|
||||
todo(sm<4 | glsl) draw quad
|
||||
probe all rgba (0.0, 0.0, 10.0, 0.0)
|
||||
|
Reference in New Issue
Block a user