An animatable scope for custom weapons. Version 1.2 is higher precision, uses the screen's center for zero coordinates and has aspect corrected 1:1 zoom.
but could this be applied as an overlay on a weapon sprite like on the Sniper in Halo 3 for example
Re: [GLSL] Scope Template
Posted: Sun Mar 24, 2019 3:27 pm
by Pixel Eater
The easiest way is to set the 'target y' property to 0 and lower the 'draw y' property so that it lines up with the sprite.
If instead your sprite is screen centered you'll need to draw a transparent circle of pixels in the sprite to be able to see through it.
Also, mess around with the gldefs file so that it reads either 'hardwareshader postprocess scene' or 'hardwareshader postprocess beforebloom' in order to place the scope in front of or behind the sprite.
Re: [GLSL] Scope Template
Posted: Tue Mar 26, 2019 5:16 am
by TiberiumSoul
Im using an angled sprite with a square LCD Window next to the scope lens is there a way to fuck with the shape too?
Re: [GLSL] Scope Template
Posted: Tue Mar 26, 2019 11:11 pm
by Pixel Eater
Only by modifying the shader, it can't be done from zscript. You'd think it'd be simpler than the circle but today I can't get it to work right. I'll come back to it later though
Re: [GLSL] Scope Template
Posted: Wed Mar 27, 2019 12:27 pm
by TiberiumSoul
Okay ill get you a pixel ratio of the LCD its definitely 16:9 widescreen even for being small as all fuck.