Hud/Image overlay shader

  • TrophiHunter
  • Topic Author
More
6 years 7 months ago - 6 years 7 months ago #1 by TrophiHunter Hud/Image overlay shader was created 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;
	}
}
Last edit: 6 years 7 months ago by TrophiHunter.
The following user(s) said Thank You: GhostRider521, Genrix, WalterDasTrevas, Sinclair, Rudy102, Yorû

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

  • XCanG
More
6 years 4 months ago #2 by XCanG Replied by XCanG on topic Hud/Image overlay shader
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.

  • WalterDasTrevas
More
6 years 4 months ago #3 by WalterDasTrevas Replied by WalterDasTrevas on topic Hud/Image overlay shader
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.

  • TrophiHunter
  • Topic Author
More
6 years 3 months ago #4 by TrophiHunter Replied by TrophiHunter on topic Hud/Image overlay shader
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.

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.