Hud/Image overlay shader

  • Posts: 17
2 years 10 months ago - 2 years 10 months ago #1 by TrophiHunter
Hello everyone, this is a port from Reshade 2.0+ to 3+ I can't remember who wrote it, I'm about 99% sure it was Marty McFly though :)
Note that the Hud image is located/placed into the Textures folder. You can modify the shader if your image/screen is smaller/larger
Code display:
/*
	Original code by Marty McFly
	Concept by TrophiHunter 
*/

#include "ReShade.fxh"

texture HudTex	< string source = "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(tex2D(ReShade::BackBuffer, texcoord),hud,hud.a);
}

technique Hud_Tech
{
	pass HudPass
	{
		VertexShader = PostProcessVS;
		PixelShader = PS_Hud;
	}
}
The following user(s) said Thank You: Genrix, WalterDasTrevas, Sinclair, Rudy102, Yorû

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

  • Posts: 4
2 years 7 months ago #2 by XCanG
It is possible to add width and height as parameters for reshade settings, so you can edit it on hud? and it possible to make it auto-detection for images what may have different size, also does it redraw image if image itself is updated? for example if this image is chat application what save it to file and as well update in reshade (for people like me with only one monitor)

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

  • Posts: 64
2 years 7 months ago #3 by WalterDasTrevas
I think I did not get it right, but I wish it were possible to CENTER the HUD on the screen, or change the positions, to see in my HDM.

Usually the HUD main information stays in the corners , and this is terrible for playing "non-VR" games on VR devices.

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

  • Posts: 17
2 years 6 months ago #4 by TrophiHunter
I'm sure all of that is possible, I just don't know how to do it haha. Can we call Marty McFly to this post and ask him? I'm sure he might be able to make something.

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