Quantcast
Channel: Questions in topic: "gun"
Viewing all articles
Browse latest Browse all 592

Weapon sights: Only-scope zooming, possibly with shaders?

$
0
0
Greetings. I've got a gun that can aim down sights (position lerping, camera reparenting, all that easy stuff). However, due to the rifle's specifics (it's futuristic, it's got a built-in optic and whatnot), I want to use a single quad (or a couple of tris after triangulation of course) in place of an optical sight, like a monitor of sorts. In any case, I would like my "monitor-sight" to be transparent, but to also see through some objects. I thought I can achieve this with shaders (I am quite adept at C# and regular programming, but I've never ever touched a shader before), but some researching seems to point otherwise, so I figured I'd ask. So, can I do this with shaders, and could I also use a shader to give my sight a low-level zoom without lowering the camera FOV (I don't want my peripheral vision zoomed in)? I'm also using Unity Indie, so RenderTextures and a second camera are not an option. *TL;DR:* [Not Pro] Can I force a shader to somehow make some polygons on an object transparent (by using a certain material), but in such a way that they also don't render some other specific objects? I.e. a "see-through certain things" effect. Can I also use a shader to magnify this seeing-through picture (at least a bit, I know that shaders only manipulate rendered pixels or vertices), and how would I go about doing that? I've got no experience in working with shaders. Thanks in advance for any replies.

Viewing all articles
Browse latest Browse all 592

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>