Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SamplerFeedback has invalid HLSL code #114

Open
StiNKzz opened this issue Nov 29, 2022 · 0 comments
Open

SamplerFeedback has invalid HLSL code #114

StiNKzz opened this issue Nov 29, 2022 · 0 comments

Comments

@StiNKzz
Copy link

StiNKzz commented Nov 29, 2022

In the sample code of the SamplerFeedback.md at line 937 begins this code block:

Texture2D<uint> g_residentMinMip : register(t1);

float4 PSMain(VSIn in) : SV_TARGET
{
        float2 uv = in.uv;
        // Optional step for SFS:
        uint minMip = g_residentMinMip.Sample(g_sampler, uv);

You cannot sample from g_residentMinMip as it is a uint texture, it produes the error:

error G21624885: cannot Sample from resource containing uint

Even if you could sample from the g_residentMinMip uint texture, it would be worth mentioning that a separate sampler using Maximum as a filter would be correct behavior, separate from the sampler being used to sample from g_texture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant