Inline and static sampler states. #421
Gavin-Williams
started this conversation in
General
Replies: 1 comment 3 replies
-
I thought maybe something like this could work...
But I get an error, initial value must be a literal expression. It looks pretty literal to me. So I guess I don't understand this aspect of the language at all. I guess I've created a variable 'AnisostropicSampler'. Though I also tried assigning the curley brace code directly to TextureSampler and that didn't work. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
If I want to quickly create a sampler state in shader, how do I do that? I tried this...
But that doesn't do anything. I also tried making it static, and that didn't work either. Could someone guide me as to how I get this to work (DirectX 11) and an explanation of how to use static objects in hlsl as well?
I know how to upload a render-state, but I'm sure I've done it this way before, and looking online I see ppl talking about it, but I can't get an actual answer to how to create a sampler state in hlsl.
Beta Was this translation helpful? Give feedback.
All reactions