[SOLVED] Problem with shader results in DX

  • matsilagi
  • Topic Author
More
6 years 1 month ago #1 by matsilagi Problem with shader results in DX was created by matsilagi
Hey.

So, i've decided to fix the Cool Retro Terminal shader i posted some time ago, and i've finally came to the conclusion its a UV issue.

I've made screenshots of the broken parts (noise output and jitter only) and how do the look on their respective environments (DirectX and opengl)

imgur.com/a/xDuxa

The pic with no black background and with a complete noisy image is correct, while the other one is the broken resuilt.

Here's the code for this: gist.github.com/anonymous/e80119b6470b7b4e46afc33f0c075b31

Any directions? I have no idea on what's wrong, i've been stuck on that for days. If i manage to get that fix i can just add the fixed code to the full shader and it will be 100% again.

Please Log in or Create an account to join the conversation.

  • crosire
More
6 years 1 month ago #2 by crosire Replied by crosire on topic Problem with shader results in DX
DX9 or DX11? Could you upload the noise texture you used somewhere so I can try?

Please Log in or Create an account to join the conversation.

  • matsilagi
  • Topic Author
More
6 years 1 month ago - 6 years 1 month ago #3 by matsilagi Replied by matsilagi on topic Problem with shader results in DX

crosire wrote: DX9 or DX11? Could you upload the noise texture you used somewhere so I can try?


Both (any DX game tbh)

Here's the files: my.mixtape.moe/rhhmwm.7z
The full shader: (incase the outputs of the nosie only aren't enough , please note tho the code is :sick: ) gist.github.com/anonymous/809a3da96f0c7a94d8a8d5e14fc682c4
Last edit: 6 years 1 month ago by matsilagi.

Please Log in or Create an account to join the conversation.

  • crosire
More
6 years 1 month ago #4 by crosire Replied by crosire on topic Problem with shader results in DX
texture tNoise <source="allNoise512.png";> { Width=512; Height=512; Format = RGBA16F;};
There's the mistake. Textures loaded from images can only be 8-bit formats. So you want RGBA8 here. This works in OpenGL because the driver implicitly converts the format. But the DirectX driver does not, as such the image data is 8-bit, but interpreted as 16-bit float when loaded on the GPU, which doesn't work.
The following user(s) said Thank You: matsilagi

Please Log in or Create an account to join the conversation.

  • matsilagi
  • Topic Author
More
6 years 1 month ago #5 by matsilagi Replied by matsilagi on topic Problem with shader results in DX
All this time for a simple format mistake.
Thanks a lot! It all works fine.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.