I did some research before doing the last comment, also thanks for answering! I did the "manual" translation to HLSL (its not like i knew what i was doing, found guide and just did it), and also found a specific tool that translates "every" shadertoy(glsl) shader to hlsl, and it didnt send any errors.
By both methods the material was black (not pink which is already good), and thats where i didnt know what to do, the video tutorial mentioned something about adding textures or something like that, but I couldnt find anything very specific after that.
On another source, i remember something about shaders on postprocessing? And thought that maybe those acted on the camera, i might just be wrong there.
Also tried the post processing stack, I also dont know if i did something wrong, but if not, it just did the game super heavy and slow, no worth for the little chromatic aberration effect it could add.
So the trick is to go line by line and slowly translate from GLSL to HLSL.
It was a mater of really understanding how the shader work and cutting the unwanted parts.
If you didn't know, shaders are pieces of code that describes the way geometries are drawn. Usually there's a couple of functions called by unity that should return the color to use for a given pixel.They are also usually run on the GPU too.
The trick here is that once the scene is rendered I take the rendered scene and pass that through a shader as a texture. By doing that I can tell Unity to change the color of a pixel of the screen for another one. Here the shader apply some kind of chromatic blur to the screen.
In Unity there are a bunch of these "screen effect". You can technically also create a new screen effect shader right in Unity.
To apply an effect we need to create a script which has a OnRenderImage() function. Once the script is added and active, we simply need to use the Graphics.Blit() function to apply the shader to the image.
Here's the Post-processing effect page in the Unity docs
Just remember that you can't feed the shader to it: you need to make a material with the wanted shader and pass it to the function.
Oh, and thank you! I'm really trying to make the graphics really stand out and on point!
Hi, on another entry I asked you about the shader you are using, and you pointed me that you basically used a modified version of an AVdistortion from shadertoy. I wanted to ask you how you manage to implement it, i found some tools and guides to use the shader in Unity but failed to make it work. I dont really know about shaders, first i tought they were used on cameras only, but now im not sure if they are only for materials. Anyways, i couldnt make it work, i was wondering if you could give me a hint or two? Thanks in advance, your game looks lit.