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

[SpriteEffects] The refraction shader should preferably use register(s1) #5

Open
rbwhitaker opened this issue Apr 9, 2023 · 0 comments

Comments

@rbwhitaker
Copy link
Owner

In refraction.fx, the original code used this:

sampler DisplacementSampler : register(s1);

The code used this:

graphics.GraphicsDevice.Textures[1] = waterfallTexture;

That would be the ideal solution, but it is unclear if MonoGame can support this. (Possibly on the DirectX side?)

The temporary solution works well enough: use a shader parameter instead, which required defining a new texture and sampler and setting those with a Parameters[x].SetValue(texture).

If we can make it work the original way, that would be better.

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