Simple Shader that draws a png image onto screen
- TrophiHunter
- Topic Author
Less
More
8 years 9 months ago #1
by TrophiHunter
Simple Shader that draws a png image onto screen was created by TrophiHunter
A message to anyone that can help, I am working on a Tank Hud for GTA5, I need to find/ have someone help me get a shader that draws a png image with an alpha over the Final "render' of the game "Last thing loaded because it needs to not be effected by any other shader, I made a Video showing what I mean, the Yellow hud is what I need over top
GTA5 Tank HUD Concept
Please Log in or Create an account to join the conversation.
- Ganossa
Less
More
8 years 9 months ago #2
by Ganossa
Replied by Ganossa on topic Simple Shader that draws a png image onto screen
Can you post that .png?
Please Log in or Create an account to join the conversation.
- TrophiHunter
- Topic Author
Less
More
8 years 9 months ago #3
by TrophiHunter
Replied by TrophiHunter on topic Simple Shader that draws a png image onto screen
Here I posted it to my flickr, if you can help Lucifer, that would be a huge step forward.
Tank Hud
Tank Hud
Please Log in or Create an account to join the conversation.
- Ganossa
Less
More
8 years 9 months ago #4
by Ganossa
Replied by Ganossa on topic Simple Shader that draws a png image onto screen
Its very quick and simple as a custom shader with the framework but I will have to find a quiet minute between the Configurator implementation
The following user(s) said Thank You: TrophiHunter
Please Log in or Create an account to join the conversation.
- TrophiHunter
- Topic Author
Less
More
8 years 9 months ago #5
by TrophiHunter
Replied by TrophiHunter on topic Simple Shader that draws a png image onto screen
Thanks, take your time, im very new to this sort of thing but I feel that Rockstar didnt do the tanks hud justice. I plan on making the hz part on the right grab the frame rate in game, also the cannon's fire how it goes from READY to WAIT, most likely on a timer as its the same every time, I also want to make a compass that displays Rotational Degrees North Being 0', and last a display that show the turret orientation, however im not sure if the tank has a bone that is in line with the turret I can Call for rotation, hope so anyway.
Please Log in or Create an account to join the conversation.
- Ganossa
Less
More
8 years 9 months ago #6
by Ganossa
Replied by Ganossa on topic Simple Shader that draws a png image onto screen
So this is how it looks with very little code::
This is the code::Create a Hud.h file in /ReShade/CustomFX with that code.
Then open ReShade.fx and add after......the new line...
I have no photoshop anymore and you alpha is blowing up the .png to 14MB which is way to huge. Therefore, I dropped the alpha and used this .png instead::
It is only 62KB big. Drop it as CFX_hud.png in your /ReShade/CustomFX/Textures folder.
After that you should be able to run the game with that hud Its only a few lines so if you can create a smaller .png with alpha it should be easy to adjust
This is the code::
NAMESPACE_ENTER(CFX)
#include CFX_SETTINGS_DEF
texture HudTex < string source = "ReShade/CustomFX/Textures/CFX_hud.png"; > {Width = 2560; Height = 1440; Format = RGBA8;};
sampler HudColor { Texture = HudTex; };
float4 PS_Hud(float4 vpos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target
{
float4 hud = tex2D(HudColor, texcoord);
return lerp(hud,tex2D(RFX_backbufferColor, texcoord),min(1,2.25f*pow(abs(hud.r+hud.b+hud.g)/3f,50)));
}
technique Hud_Tech <bool enabled = RFX_Start_Enabled; int toggle = RFX_ToggleKey; >
{
pass HudPass
{
VertexShader = RFX_VS_PostProcess;
PixelShader = PS_Hud;
}
}
#include CFX_SETTINGS_UNDEF
NAMESPACE_LEAVE()
Then open ReShade.fx and add after...
#include EFFECT(CustomFX, Gr8mmFilm)
#include EFFECT(CustomFX, Hud)
I have no photoshop anymore and you alpha is blowing up the .png to 14MB which is way to huge. Therefore, I dropped the alpha and used this .png instead::
It is only 62KB big. Drop it as CFX_hud.png in your /ReShade/CustomFX/Textures folder.
After that you should be able to run the game with that hud Its only a few lines so if you can create a smaller .png with alpha it should be easy to adjust
The following user(s) said Thank You: SLAMNDAN, Ederer
Please Log in or Create an account to join the conversation.
- TrophiHunter
- Topic Author
Less
More
8 years 9 months ago #7
by TrophiHunter
Replied by TrophiHunter on topic Simple Shader that draws a png image onto screen
Wow thank you so much, I can easily use compression, the one I gave was uncompressed, if I compress then I should be ok. thanks again
Please Log in or Create an account to join the conversation.
- Ganossa
Less
More
8 years 9 months ago #8
by Ganossa
Replied by Ganossa on topic Simple Shader that draws a png image onto screen
Can you post that compressed .png, you would need to change a little line in that code
Please Log in or Create an account to join the conversation.
- TrophiHunter
- Topic Author
Less
More
8 years 9 months ago #9
by TrophiHunter
Replied by TrophiHunter on topic Simple Shader that draws a png image onto screen
Ok just let me know what line of code to change
Please Log in or Create an account to join the conversation.
- Ganossa
Less
More
8 years 9 months ago - 8 years 9 months ago #10
by Ganossa
Replied by Ganossa on topic Simple Shader that draws a png image onto screen
To use alpha, changeto
It is much more accurate but make sure to compress that huge .png file
return lerp(hud,tex2D(RFX_backbufferColor, texcoord),min(1,2.25f*pow(abs(hud.r+hud.b+hud.g)/3f,50)));
return lerp(tex2D(RFX_backbufferColor, texcoord),hud,hud.a);
It is much more accurate but make sure to compress that huge .png file
Last edit: 8 years 9 months ago by Ganossa.
The following user(s) said Thank You: SLAMNDAN
Please Log in or Create an account to join the conversation.
- TrophiHunter
- Topic Author
Less
More
8 years 9 months ago #11
by TrophiHunter
Replied by TrophiHunter on topic Simple Shader that draws a png image onto screen
Here's what I got so far, no post production
Tank HUD Beta
Please Log in or Create an account to join the conversation.
- Labont
Less
More
1 week 1 day ago #12
by Labont
Replied by Labont on topic Simple Shader that draws a png image onto screen
How did you export game data to ReShade?
Please Log in or Create an account to join the conversation.