Welcome, Guest.
Username: Password: Remember me

TOPIC: Two requests: Fullscreen Zoom & 2 Crosshairs to 1

Two requests: Fullscreen Zoom & 2 Crosshairs to 1 1 month 3 weeks ago #1

Hi guys,

First up, the zoom..
I have absolutely no idea how to tackle this. I am looking for a shader that'll zoom in the screen by a x2 or x3 margin (or even a slider). While I know the result after will be pixelated, i am still interested. The TV simulator did something like this with a warp effect as well, but that's pretty FPS heavy and I dislike the resolution scaling it does by faking the "old tv" effect.

The reason why I'm doing this is because lowering / increasing FOV in some games warps the models and looks odd on screenshots.

--
Secondly, the crosshairs...

I have these 2 crosshair files; one named xhair (external pastebin link) and one advanced_crosshair (from this forum, link). The problem with xhair is that it uses a fixed width and height + a fixed w*h mask (1920 x 1080). This means the crosshair is off center in almost all cases except for ideal 1920x1080p monitors. And the mask, which is basically a .png with a small 4x4px dot in the middle, is also offcenter by 1 px.

The good part about xhair is it's configuration interface, you have many modes and adjustments you can do. I want to port it over to the advanced_crosshair file, especially the color inversion. I'm mainly looking to transfer over the inversion mode, xyz repositioning of the crosshair and maybe also hook in the 'texture' mode, but have it calculate screen res by using:
float2( (BUFFER_WIDTH / 2)-1, (BUFFER_HEIGHT / 2)-1);

instead of:
texture xhairTex	<  source = "xhair.png"; > {Width = 1920; Height = 1080; Format = RGBA8;};
sampler	xhairSampler 	{ Texture = xhairTex; };

texture xhairMaskTex	<  source = "xhair_mask.png"; > {Width = 1920; Height = 1080; Format = RGBA8;};
sampler	xhairMaskSampler 	{ Texture = xhairMaskTex; };

Any help on both subjects would be appreciated!
The administrator has disabled public write access.

Two requests: Fullscreen Zoom & 2 Crosshairs to 1 1 month 3 weeks ago #2

I have made a Zoom effect: github.com/luluco250/FXShaders/blob/master/Shaders/Zoom.fx

I'm trying to understand what you want to do with the crosshair thing, well one thing you could try is adapt the texture to whatever aspect ratio/resolution the game is running in.

A function I like to use for scaling coordinates is this:
float scale_uv(float uv, float2 scale, float2 center) {
	return (uv - center) * scale + center;
}
// For normalized coordinates
float2 scale_uv(float2 uv, float2 scale) {
	return scale_uv(uv, scale, 0.5);
} 

You can easily use it to adapt different aspect ratios and resolutions.
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
Last Edit: 1 month 3 weeks ago by luluco250.
The administrator has disabled public write access.

Two requests: Fullscreen Zoom & 2 Crosshairs to 1 1 month 2 weeks ago #3

Thanks!

The zoom function doesnt seem to work, though :(
The administrator has disabled public write access.

Two requests: Fullscreen Zoom & 2 Crosshairs to 1 1 month 2 weeks ago #4

I'm back on my PC now let me test it.
See if it works now: reshade.me/forum/shader-presentation/4150-simple-zoom-shader
Likes to reinvent the wheel.

My shaders repository: www.github.com/luluco250/FXShaders
Last Edit: 1 month 2 weeks ago by luluco250.
The administrator has disabled public write access.