2024-03-20 18:21:12 -07:00
|
|
|
[require]
|
|
|
|
shader model >= 4.1
|
|
|
|
|
|
|
|
|
|
|
|
[sampler 0]
|
|
|
|
filter linear linear linear
|
|
|
|
address clamp clamp clamp
|
|
|
|
|
|
|
|
[srv 0]
|
|
|
|
size (2d, 4, 4)
|
|
|
|
levels 3
|
|
|
|
|
|
|
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
|
|
|
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
|
|
|
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
|
|
|
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
|
|
|
|
|
2024-04-11 18:33:37 -07:00
|
|
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
|
|
|
|
0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5
|
|
|
|
|
|
|
|
0.5 0.5 0.5 0.5
|
2024-03-20 18:21:12 -07:00
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
sampler s;
|
|
|
|
Texture2D t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
return float4(t.CalculateLevelOfDetail(s, pos.xy),
|
|
|
|
t.CalculateLevelOfDetail(s, float2(0.5 * pos.x, 0.5 * pos.y)),
|
|
|
|
t.CalculateLevelOfDetail(s, float2(0.25 * pos.x, 0.25 * pos.y)),
|
|
|
|
floor(10.0 * t.CalculateLevelOfDetail(s, float2(0.1 * pos.x, 0.7 * pos.y))));
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-05-02 08:11:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0, 640, 480) rgba (2.0, 1.0, 0.0, 14.0)
|
2024-03-20 18:21:12 -07:00
|
|
|
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
sampler s;
|
|
|
|
Texture2D t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
return float4(t.CalculateLevelOfDetail(s, float2(3.0 * pos.x, 5.0 * pos.y)),
|
|
|
|
t.CalculateLevelOfDetail(s, float2(10.0 * pos.x, 10.0 * pos.y)),
|
|
|
|
t.CalculateLevelOfDetail(s, float2(0.1 * pos.x, 0.02 * pos.y)),
|
|
|
|
t.CalculateLevelOfDetail(s, float2(0.01 * pos.x, 0.01 * pos.y)));
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-05-02 08:11:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0, 640, 480) rgba (2.0, 2.0, 0.0, 0.0)
|
2024-03-20 18:21:12 -07:00
|
|
|
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
sampler s;
|
|
|
|
Texture2D t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
return float4(t.CalculateLevelOfDetailUnclamped(s, pos.xy),
|
|
|
|
t.CalculateLevelOfDetailUnclamped(s, float2(0.5 * pos.x, 0.5 * pos.y)),
|
|
|
|
t.CalculateLevelOfDetailUnclamped(s, float2(0.25 * pos.x, 0.25 * pos.y)),
|
|
|
|
floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(0.1 * pos.x, 0.7 * pos.y))));
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-05-02 08:11:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0, 640, 480) rgba (2.0, 1.0, 0.0, 14.0)
|
2024-03-20 18:21:12 -07:00
|
|
|
|
|
|
|
|
|
|
|
[pixel shader todo]
|
|
|
|
sampler s;
|
|
|
|
Texture2D t;
|
|
|
|
|
|
|
|
float4 main(float4 pos : sv_position) : sv_target
|
|
|
|
{
|
|
|
|
return float4(floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(3.0 * pos.x, 6.0 * pos.y))),
|
|
|
|
floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(8.0 * pos.x, 8.0 * pos.y))),
|
|
|
|
floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(0.1 * pos.x, 0.02 * pos.y))),
|
|
|
|
floor(10.0 * t.CalculateLevelOfDetailUnclamped(s, float2(0.01 * pos.x, 0.01 * pos.y))));
|
|
|
|
}
|
|
|
|
|
|
|
|
[test]
|
2024-05-02 08:11:57 -07:00
|
|
|
todo(sm<6) draw quad
|
2024-02-10 11:16:22 -08:00
|
|
|
probe (0, 0, 640, 480) rgba (45.0, 50.0, -14.0, -47.0)
|